You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/ondrej/repos/lpython/src/libasr/codegen/llvm_utils.cpp:1487:21: warning: variable 'pred' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
default: {
^~~~~~~
/Users/ondrej/repos/lpython/src/libasr/codegen/llvm_utils.cpp:1491:43: note: uninitialized use occurs here
return builder->CreateCmp(pred, left, right);
^~~~
/Users/ondrej/repos/lpython/src/libasr/codegen/llvm_utils.cpp:1465:9: note: variable 'pred' is declared here
llvm::CmpInst::Predicate pred;
^
I thought we test for this at the CI. Maybe we only do it for LFortran.
I thought we test for this at the CI. Maybe we only do it for LFortran.
Yes, we have to add -Werror at the CI. We previously discussed it here #2062 (review). I have a minor concern. When building lpython there is warning about unused variable yynerrs in parser.tab.cc. This file parser.tab.cc is a generated file, thus we are unable to use the variable or add maybe unused. We do not experience this in lfortran since it uses %glr-parser, where as (it seems) lpython uses LR(1) parser.
The warning of unused variable yynerrs in parser.tab.cc seems to be a bug in bison. This bug seems to be fixed in the latest bison, but they did not make a release of it post fixing. I have requested for a release here akimd/bison#103.
Activity
ubaidsk commentedon Jul 10, 2023
Yes, we have to add
-Werrorat the CI. We previously discussed it here #2062 (review). I have a minor concern. When buildinglpythonthere is warning about unused variableyynerrsinparser.tab.cc. This fileparser.tab.ccis a generated file, thus we are unable to use the variable or addmaybe unused. We do not experience this inlfortransince it uses%glr-parser, where as (it seems)lpythonusesLR(1)parser.The warning of unused variable
yynerrsinparser.tab.ccseems to be a bug inbison. This bug seems to be fixed in the latestbison, but they did not make a release of it post fixing. I have requested for a release here akimd/bison#103.certik commentedon Jul 10, 2023
There might be a way to turn off
-Werrorfor the Bison file. Alternatively we can "post process" the file to remove "yynerrs" with a Python script.