Statement label should be allowed to be a duplicate of a parameter #1603
Comments
Original Redmine Comment Ok well that formatting failed - trying again: This syntax is not allowed by verilator:
Results in the following error:
What exactly is the limitation here? C99 at least does allow this:
|
Original Redmine Comment This is to protect against what in some cases may become: int foo; which causes a mess of course. Verilator does currently rename some constructs by adding PVT to the names, but this same prefix would be added to both, so there would still be a conflict. Perhaps a different prefix could be used for variables and blocks, but this sort of name collision seems a bad practice, and certainly would be a lint problem regardless, so I'm reluctant to add code and break backward compatibility for it. |
Author Name: Pieter Kapsenberg
Original Redmine Issue: 1603 from https://www.veripool.org
This syntax is not allowed by verilator:
Results in the following error.
%Error: test.sv:3: Unsupported in C: Block has the same name as variable: DEMO
%Error: test.sv:2: ... Location of original declaration
What exactly is the limitation here? C99 at least does allow this:
The text was updated successfully, but these errors were encountered: