-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: re-enable warnings as errors by default and fix the warnings #11854
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
base: master
Are you sure you want to change the base?
Conversation
| */ | ||
| virtual Token *getNextToken() = 0; | ||
| virtual void setParser(void* parser) {}; | ||
| virtual void setParser(void* parser) {} |
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.
This is generated code, so should not be done. An PR (javacc/javacc#315) has been created upstream.
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.
Ok, I can see that it gets generated by the upstream javacc
however if this is not found then it falls back to using the existing files
message(STATUS " Fall back to JavaCC not installed, using existing files.")
and since this existing file is part of the code base and it causes a warning, which the purpose of this PR is to remove all warnings and turn on warnings as errors, What's wrong with updating the existing file.
When the javacc is updated upstream and the generated code matches, then the later pull request will address this issue again, but until then, why not remove the existing warnings from the code which is not always autogenerated as shown above?
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.
The javaCC code is run each time when the one of the *.jj or one of the non generated included files is changed and thus at that moment the ; would reappear (and would flow into the "using existing files").
As written there is a proposed PR for this upstream (javacc/javacc#315) but I'm not confident that this will be integrated soon and afterwards be available in a release of javaCC (and it is also unclear what kind of problems we might find there at that moment).
| /w14906 # string literal cast to 'LPWSTR' | ||
| /w14928 # illegal copy-initialization; more than one user-defined | ||
| # conversion has been implicitly applied | ||
| /WX # Treat warnings as errors |
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.
When not mistaken this option for the different platforms will stop at the first error and this was not desirable
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.
Why is this not desirable?
Surely we want a warning free codebase?
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.
Indeed a warning free codebase is very desirable but some parts are outside of our control (like e.g the ; in the generated code) and there are more of those places. This would mean that the compiler would always stop at these places and it would be a big burden on / impossibility for projects that regularly build doxygen (e.g. CGAL).
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.
right in that case do we just shelve this PR as the issues are not internally resolvable?
instead I will just remove the other warnings from the two files I have changed in this PR without comment. But raise that as a separate PR addressing just those concerns and keeping the warnings as errors and the code dependant on upstream javacc out of it
turn on warnings as errors and fix the existing warnings