Skip to content

Fix compiler warnings in vqm2blif #2294

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

Closed
vaughnbetz opened this issue Apr 25, 2023 · 6 comments
Closed

Fix compiler warnings in vqm2blif #2294

vaughnbetz opened this issue Apr 25, 2023 · 6 comments
Assignees
Labels

Comments

@vaughnbetz
Copy link
Contributor

Expected Behaviour

We should have no compiler warnings.

Current Behaviour

Some warnings in vqm2blif:

[ 50%] [BISON][VqmParser] Building parser with bison 3.8.2
/home/runner/work/vtr-verilog-to-routing/vtr-verilog-to-routing/libs/libvqm/vqm_parser.y:45.1-14: warning: deprecated directive: ‘%error-verbose’, use ‘%define parse.error verbose’ [-Wdeprecated]
45 | %error-verbose
| ^~~~~~~~~~~~~~
| %define parse.error verbose
/home/runner/work/vtr-verilog-to-routing/vtr-verilog-to-routing/libs/libvqm/vqm_parser.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother]
[ 50%] [FLEX][VqmLexer] Building scanner with flex 2.6.4
[ 50%] Building CXX object libs/libvqm/CMakeFiles/libvqm.dir/vqm_common.c.o
[ 50%] Building CXX object abc/CMakeFiles/libabc.dir/src/sat/glucose/Options.cpp.o
[ 50%] Building CXX object libs/libvqm/CMakeFiles/libvqm.dir/vqm_dll.cpp.o
/home/runner/work/vtr-verilog-to-routing/vtr-verilog-to-routing/libs/libvqm/vqm_dll.cpp: In function ‘int vqm_get_error_message(char*, int)’:
/home/runner/work/vtr-verilog-to-routing/vtr-verilog-to-routing/libs/libvqm/vqm_dll.cpp:120:23: warning: passing argument 1 to ‘restrict’-qualified parameter aliases with argument 2 [-Wrestrict]
120 | strcpy(message_buffer, message_buffer);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 50%] Building CXX object libs/libvqm/CMakeFiles/libvqm.dir/vqm_lexer.gen.c.o

/home/runner/work/vtr-verilog-to-routing/vtr-verilog-to-routing/utils/vqm2blif/src/base/hard_block_recog.cpp:1738:31: warning: unknown escape sequence: ']'
1738 | std::regex port_is_a_bus ("(.)[]~(?:.)");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
[ 85%] Building CXX object utils/vqm2blif/CMakeFiles/libvqm2blif.dir/src/base/hash.cpp.o
[ 85%] Building CXX object vpr/CMakeFiles/libvpr.dir/src/base/check_netlist.cpp.o
[ 85%] Building CXX object utils/vqm2blif/CMakeFiles/libvqm2blif.dir/src/base/lut_recog.cpp.o
[ 85%] Building CXX object utils/vqm2blif/CMakeFiles/libvqm2blif.dir/src/base/lut_stats.cpp.o
[ 85%] Building CXX object utils/vqm2blif/CMakeFiles/libvqm2blif.dir/src/base/preprocess.cpp.o
[ 85%] Building CXX object vpr/CMakeFiles/libvpr.dir/src/base/clock_modeling.cpp.o
[ 85%] Building CXX object utils/vqm2blif/CMakeFiles/libvqm2blif.dir/src/base/vqm2blif_util.cpp.o
[ 85%] Building CXX object vpr/CMakeFiles/libvpr.dir/src/base/clustered_netlist.cpp.o
/home/runner/work/vtr-verilog-to-routing/vtr-verilog-to-routing/utils/vqm2blif/src/base/vqm2blif_util.cpp: In function ‘void verify_hard_block_type_name(std::string)’:
/home/runner/work/vtr-verilog-to-routing/vtr-verilog-to-routing/utils/vqm2blif/src/base/vqm2blif_util.cpp:63:47: warning: unknown escape sequence: '$'
63 | std::regex verilog_VHDL_naming_rules_one ("^[a-zA-Z_][a-zA-Z_$0-9]*[a-zA-Z_$0-9]$");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/vtr-verilog-to-routing/vtr-verilog-to-routing/utils/vqm2blif/src/base/vqm2blif_util.cpp:63:47: warning: unknown escape sequence: '$'

Possible Solution

Fix the warnings.

Your Environment

Occurred in a CI run on April 24, 2023:

https://github.com/verilog-to-routing/vtr-verilog-to-routing/actions/runs/4790484294/jobs/8519669398?pr=2293

@AlexandreSinger
Copy link
Contributor

AlexandreSinger commented Apr 4, 2024

@kimiatkh As with issue #2403 , I am trying to remove all issues in VTR (see issue #2518) what is the progress on this issue?

@kimiatkh
Copy link
Contributor

@AlexandreSinger My apologies for the delayed response. I haven't had the chance to work on this yet. But I'll do my best to address this by next week. I'll keep you posted on any updates regarding the issue.

@AlexandreSinger
Copy link
Contributor

@kimiatkh Not a problem at all! There is no rush on this, I have just been eating away at these warnings over the last couple of weeks. I have just raised an PR on the regex warnings (PR #2537 ). The strcpy one is the only one left I think. I have been talking with Soheil; we think that this one may actually be a bug where the wrong value was being copied. Whenever you get the chance to look into it, or if you are low on time, do let me know!

@AlexandreSinger
Copy link
Contributor

I believe all of these warnings are now gone after Navid's most PR. PR #2549

Shall we close this issue @vaughnbetz

Copy link

This issue has been inactive for a year and has been marked as stale. It will be closed in 15 days if it continues to be stale. If you believe this is still an issue, please add a comment.

@github-actions github-actions bot added the Stale label May 22, 2025
@AlexandreSinger
Copy link
Contributor

This issue has been resolved. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants