-
Notifications
You must be signed in to change notification settings - Fork 597
Fix misc compiler warnings #10609
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
Fix misc compiler warnings #10609
Conversation
8dd2cd0 to
05b635d
Compare
Al2Klimov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a25c3f1 to
289607b
Compare
Oh, forgot to send my reply to this. These warning don't exist on my machine and replacing $ bison --version
bison (GNU Bison) 2.3
Written by Robert Corbett and Richard Stallman
---And after going through the Bison docs, there's quite no difference between |
289607b to
4389abf
Compare
4389abf to
179aa12
Compare
|
This is necessary to stop MSVC complaining that "not all paths return a value", because it is not able to infer that the expression `false ? 0 : non_returning_function()` never returns. In the process of debugging this I've also slightly simplified the other assert macros and abort function, so they don't need compiler specific preprocessor-paths anymore.
179aa12 to
11e83b6
Compare
|
And the dumbest compiler award goes to... *drumroll* 🎉MSVC🎉, for the inability to infer that the expression |
yhabteab
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LFTM! Ty.
Together with #9411, #9728, #9729 and #9730 this fixes most of the remaining compiler warnings, except the following:
-Wdangling-referenceinscheduleddowntime-apply.cpp, which I'm pretty sure are false positives.-Wdeprecated-declarationswarnings.%pure-parserbeing deprecated in the.yyparser files. At first I wanted to include them here, but despite things seemingly building fine it seems there's some additional implications with replacing%pure-parserwith%define api.pureand%error-verbosewith%define parse.error verbosethat I can't judge because I'm not a bison expert./Wall)