New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "included from" and macro expansion information in error messages #1439
Comments
Original Redmine Comment Have you looked at this?, if not will look at the include part first which seems easier. |
Original Redmine Comment I haven't done anything yet. Please feel free. |
Original Redmine Comment Includes easier than thought as preproc already records the include tree. Also added easy insertion point for adding source annotation later. Pushed to git towards 4.017. Punting on defines for now as this will be hard to communicate within the preproc and beyond, think better to get column information first (#�), then may revisit. |
Original Redmine Comment Notes on how GCC tracks defines. Debug can be seen with "g++ -fdebug-cpp -E -c file.cpp". line-map.c's linemap_dump_location describes the format: /* P: path, L: line, C: column, S: in-system-header, M: map address, Passing info from CPP to backend is enabled with "-ftrack-macro-expansion" |
Original Redmine Comment Macro expansion is very difficult as requires tracking recursive information on every token through the preprocessor. Closing out as included's froms there, and unlikely to get more in the medium-long term unless someone has a lot of time. |
Author Name: Todd Strader (@toddstrader)
Original Redmine Issue: 1439 from https://www.veripool.org
Original Assignee: Todd Strader (@toddstrader)
Ideally Verilator would report messages similar to gcc in these scenarios. Something like this:
This probably relates to issue #1435. Also, I suspect this will work best as two patches: "included from" and macro expansion.
The text was updated successfully, but these errors were encountered: