Replies: 2 comments
-
I can see it's useful for warnings if they can be disabled individually, although I prefer strings as identifiers like GCC (e.g. For error messages I'd rather make the message itself as descriptive as possible rather than adding an ID that has to be looked up separately. There's already some support for adding extra information to diagnostics (e.g. |
Beta Was this translation helpful? Give feedback.
-
I see. Of course for user this should behave transparently. User would see the error "code" plus the error message. The "added information" that could potentially be part of manual, would be e.g. an examples of how to fix such error Implementation wise, yes, this may be difficult. All messages would need to be defined centrally somewhere, Promoting warnings to errors is important when you want to enforce writing your code as strict as possible. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I was wondering if NVC could support some sort of grouping/classification of error/warning/diag messages.
An error would be uniquely identified by e.g. an abbreviation and number. An abbreviation
would correspond to the processing phase of the code (e.g.
VHDAN_
for VHDL analysis,VHDSM_
for semantic checks,VLGAN_
for Verilog analysis,ELAB_
for elaboration,CGEN_
for code generation, etc...)The format of message then would be e.g.:
Error (ELAB_4): example.vhd:39 - invalid formal name for unconstrained port test_enable
The errors/warning/diag messages would be defined somewhere in an array and distinguished
by an enum e.g:
This implementation would allow stuff like:
nvc -EnoVHDAN_2
).Sure, not all errors are down-gradable to warning, some make it impossible to continue. However, many cases
would benefit from this configurability.
This is similar to what OpenROAD is doing, and what can be done in GCC by
-W*
switches.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions