mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Fix IGNOREDRETURN to not warn on void-cast static function calls.
This commit is contained in:
parent
188cf85b3f
commit
d840c612d4
1
Changes
1
Changes
@ -35,6 +35,7 @@ Verilator 5.015 devel
|
||||
* Fix reference to extended class in parameterized class (#4466).
|
||||
* Fix display %x formatting of real.
|
||||
* Fix mis-warning on #() in classes' own functions.
|
||||
* Fix IGNOREDRETURN to not warn on void-cast static function calls.
|
||||
* Fix ZERODLY to not warn on 'wait(0)'.
|
||||
|
||||
|
||||
|
@ -3558,9 +3558,11 @@ statement_item<nodep>: // IEEE: statement_item
|
||||
// // Alternative would be shim with new AstVoidStmt.
|
||||
| yVOID yP_TICK '(' task_subroutine_callNoMethod ')' ';'
|
||||
{ $$ = $4;
|
||||
FileLine* const newfl = new FileLine{$$->fileline()};
|
||||
AstNode* callp = $$;
|
||||
while (AstDot* const dotp = VN_CAST(callp, Dot)) callp = dotp->rhsp();
|
||||
FileLine* const newfl = new FileLine{callp->fileline()};
|
||||
newfl->warnOff(V3ErrorCode::IGNOREDRETURN, true);
|
||||
$$->fileline(newfl);
|
||||
callp->fileline(newfl);
|
||||
$$ = VN_AS($$, NodeExpr)->makeStmt(); }
|
||||
| yVOID yP_TICK '(' expr '.' task_subroutine_callNoMethod ')' ';'
|
||||
{ $$ = new AstDot{$5, false, $4, $6};
|
||||
|
@ -15,6 +15,12 @@ module t (clk);
|
||||
side_effect += in + 1;
|
||||
endfunction
|
||||
|
||||
class Cls;
|
||||
static function int initialize();
|
||||
return 6;
|
||||
endfunction
|
||||
endclass
|
||||
|
||||
initial begin
|
||||
int got;
|
||||
side_effect = 1;
|
||||
@ -30,6 +36,8 @@ module t (clk);
|
||||
void'(f1(30));
|
||||
if (side_effect != 64) $stop;
|
||||
//
|
||||
void'(Cls::initialize());
|
||||
//
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user