mirror of
https://github.com/verilator/verilator.git
synced 2025-04-28 11:36:56 +00:00
Fix parametrized defines with empty arguments.
This commit is contained in:
parent
72218fb475
commit
e39eddf3fe
2
Changes
2
Changes
@ -11,6 +11,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
||||
|
||||
**** Fix make uninstall, bug216. [Iztok Jeras]
|
||||
|
||||
**** Fix parametrized defines with empty arguments.
|
||||
|
||||
* Verilator 3.800 2010/02/07
|
||||
|
||||
Application visible changes:
|
||||
|
@ -511,7 +511,9 @@ string V3PreProcImp::defineSubst(V3DefineRef* refp) {
|
||||
if (*cp=='"') quote=!quote;
|
||||
if (*cp) token += *cp;
|
||||
}
|
||||
if (refp->args().size() > numArgs) {
|
||||
if (refp->args().size() > numArgs
|
||||
// `define X() is ok to call with nothing
|
||||
&& !(refp->args().size()==1 && numArgs==0 && trimWhitespace(refp->args()[0],false)=="")) {
|
||||
fileline()->v3error("Define passed too many arguments: "+refp->name()+"\n");
|
||||
return " `"+refp->name()+" ";
|
||||
}
|
||||
|
@ -864,6 +864,7 @@ escid \\[^ \t\f\r\n]+
|
||||
"`celldefine" { PARSEP->inCellDefine(true); }
|
||||
"`default_decay_time"{ws}+[^\n\r]* { } // Verilog spec - delays only
|
||||
"`default_nettype"{ws}+[a-zA-Z0-9]* { yyerrorf("Unsupported: Verilog 2001 directive not implemented: %s",yytext); } // Verilog 2001
|
||||
"`default_trireg_strength"{ws}+[^\n\r]* { yyerrorf("Unsupported: Verilog optional directive not implemented: %s",yytext); }
|
||||
"`delay_mode_distributed" { } // Verilog spec - delays only
|
||||
"`delay_mode_path" { } // Verilog spec - delays only
|
||||
"`delay_mode_unit" { } // Verilog spec - delays only
|
||||
|
Loading…
Reference in New Issue
Block a user