mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
verilog: do not warn for attributes on null statements
This commit is contained in:
parent
29d84339bf
commit
1c117ac023
|
@ -2230,7 +2230,6 @@ behavioral_stmt:
|
||||||
non_opt_delay behavioral_stmt |
|
non_opt_delay behavioral_stmt |
|
||||||
attr simple_behavioral_stmt ';' |
|
attr simple_behavioral_stmt ';' |
|
||||||
attr ';' {
|
attr ';' {
|
||||||
log_file_warning(current_filename, get_line_num(), "Attribute(s) attached to null statement. Ignoring.\n");
|
|
||||||
free_attr($1);
|
free_attr($1);
|
||||||
} |
|
} |
|
||||||
attr hierarchical_id {
|
attr hierarchical_id {
|
||||||
|
@ -2534,7 +2533,6 @@ module_gen_body:
|
||||||
gen_stmt_or_module_body_stmt:
|
gen_stmt_or_module_body_stmt:
|
||||||
gen_stmt | module_body_stmt |
|
gen_stmt | module_body_stmt |
|
||||||
attr ';' {
|
attr ';' {
|
||||||
log_file_warning(current_filename, get_line_num(), "Attribute(s) attached to null statement. Ignoring.\n");
|
|
||||||
free_attr($1);
|
free_attr($1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
logger -expect warning "Attribute\(s\) attached to null statement\. Ignoring\." 1
|
|
||||||
logger -expect-no-warnings
|
logger -expect-no-warnings
|
||||||
read_verilog <<EOT
|
read_verilog <<EOT
|
||||||
module test ();
|
module test ();
|
||||||
|
@ -7,10 +6,10 @@ module test ();
|
||||||
if (y) (* foo *) ;
|
if (y) (* foo *) ;
|
||||||
endmodule
|
endmodule
|
||||||
EOT
|
EOT
|
||||||
|
select -assert-none a:* a:src %d
|
||||||
|
|
||||||
|
|
||||||
design -reset
|
design -reset
|
||||||
logger -expect warning "Attribute\(s\) attached to null statement\. Ignoring\." 3 # cumulative
|
|
||||||
logger -expect-no-warnings
|
logger -expect-no-warnings
|
||||||
read_verilog <<EOT
|
read_verilog <<EOT
|
||||||
module test ();
|
module test ();
|
||||||
|
@ -19,10 +18,10 @@ module test ();
|
||||||
if (y) (* foo *) ; else (* bar *) ;
|
if (y) (* foo *) ; else (* bar *) ;
|
||||||
endmodule
|
endmodule
|
||||||
EOT
|
EOT
|
||||||
|
select -assert-none a:* a:src %d
|
||||||
|
|
||||||
|
|
||||||
design -reset
|
design -reset
|
||||||
logger -expect warning "Attribute\(s\) attached to null statement\. Ignoring\." 4 # cumulative
|
|
||||||
logger -expect-no-warnings
|
logger -expect-no-warnings
|
||||||
read_verilog <<EOT
|
read_verilog <<EOT
|
||||||
module test ();
|
module test ();
|
||||||
|
@ -30,10 +29,10 @@ module test ();
|
||||||
generate if (y) (* foo *) ; endgenerate
|
generate if (y) (* foo *) ; endgenerate
|
||||||
endmodule
|
endmodule
|
||||||
EOT
|
EOT
|
||||||
|
select -assert-none a:*
|
||||||
|
|
||||||
|
|
||||||
design -reset
|
design -reset
|
||||||
logger -expect warning "Attribute\(s\) attached to null statement\. Ignoring\." 6 # cumulative
|
|
||||||
logger -expect-no-warnings
|
logger -expect-no-warnings
|
||||||
read_verilog <<EOT
|
read_verilog <<EOT
|
||||||
module test ();
|
module test ();
|
||||||
|
@ -41,3 +40,4 @@ module test ();
|
||||||
generate if (y) (* foo *) ; else (* bar *); endgenerate
|
generate if (y) (* foo *) ; else (* bar *); endgenerate
|
||||||
endmodule
|
endmodule
|
||||||
EOT
|
EOT
|
||||||
|
select -assert-none a:*
|
||||||
|
|
Loading…
Reference in a new issue