diff options
author | whitequark <whitequark@whitequark.org> | 2020-05-28 09:41:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 09:41:04 +0000 |
commit | fdca785eda0ba3d9efd4c2a82539d0f98853e5a5 (patch) | |
tree | 64023cb55e9c5185681a7994bb40688981a2f0d6 | |
parent | 8a44a46806cc2246eea9668bd400dc4b37a38065 (diff) | |
parent | 6aa0f72ae9e47c81441a2cecef18b7f90671ec6d (diff) | |
download | yosys-fdca785eda0ba3d9efd4c2a82539d0f98853e5a5.tar.gz yosys-fdca785eda0ba3d9efd4c2a82539d0f98853e5a5.tar.bz2 yosys-fdca785eda0ba3d9efd4c2a82539d0f98853e5a5.zip |
Merge pull request #2087 from rswarbrick/lex-warn
Silence spurious warning in Verilog lexer when compiling with GCC
-rw-r--r-- | frontends/verilog/verilog_lexer.l | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/frontends/verilog/verilog_lexer.l b/frontends/verilog/verilog_lexer.l index f6a3ac4db..65a2e9a78 100644 --- a/frontends/verilog/verilog_lexer.l +++ b/frontends/verilog/verilog_lexer.l @@ -128,7 +128,9 @@ static bool isUserType(std::string &s) %x BASED_CONST %% - int comment_caller; + // Initialise comment_caller to something to avoid a "maybe undefined" + // warning from GCC. + int comment_caller = INITIAL; <INITIAL,SYNOPSYS_TRANSLATE_OFF>"`file_push "[^\n]* { fn_stack.push_back(current_filename); |