Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  IPC::Locker
  Parallel::Forker
  Voneline
General Info
  Papers

Issue #1659

Preprocessor doesn't handle one case of definition substitution properly

Added by Topa Tota 11 days ago. Updated 10 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
% Done:

0%


Description

If you run the preprocessor on this code

`define test(a1,a2) ((a1) + (a2))

`test val  
( 1,2)

Output will be


((val    1) + (2))

It should give an error since there is no opening parenthesis after the definition name "test". However, what happens is that everything between the definition name and opening parenthesis gets prepended into the first argument.

This issue can mess up the code without the user detecting any errors. For example, user forgets to pass arguments to the definition name and a few lines later has a function call with same number of arguments.

History

#1 Updated by Wilson Snyder 11 days ago

  • Status changed from New to Confirmed
  • Assignee set to Wilson Snyder

Will fix this after next Verilator release. (Verilator has same preprocessor.)

#2 Updated by Wilson Snyder 10 days ago

  • Status changed from Confirmed to Resolved

Fixed in git towards eventual 3.472 release.

Also added to Verilator.

Also available in: Atom