-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Removed mentions of Wdeclaration-after-statement now that C99 is requ… #447
Merged
lrknox
merged 2 commits into
HDFGroup:develop
from
seanm:remove-Wdeclaration-after-statement
May 3, 2021
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should this warning also be taken out of error-general file or downgraded to just a warning in that file?
Also, line 2 and 3 of this file should be reworded. Maybe something like:
HDF5 code should not trigger the following warnings, they are identified
as candidates for the compiler to treat them 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.
There should not be a noerror-general file or any other noerror- file.
The error- and noerror- files are identical under a simple search and replace that is in
config/gnu-flags
: ifPROMOTE_ERRORS
is set tono
then every occurrence of-Werror=
is transformed to a warning (-W
). Looks like the CMake files can do essentially the same thing.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.
"Silence is golden." Declarations after statements are allowed, so let's just delete
-Wdeclaration-after-statement
everywhere it occurs.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.
But wouldn't that promote ALL warnings? I thought the error-general file was intended to only promote those that should pass?
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.
I didn't think we came to a conclusion on this. We would need a way to identify (maybe a ./bin/check_declaration script?) what was valid vs not wanted behavior.
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.
I don't know what you mean, "promote ALL warnings." Not all warnings are in the
error-
files. Theerror-
files are supposed to contain those warnings that should ordinarily stop the library compilation cold.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.
If there is an objectionable declaration after statement, then the place to flag that is during PR review.
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.
I'd rather avoid many "noisy" PRs and just keep the error
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.
From a quick review of the platforms being reported in DT, it looks like no configuration is complaining about for loop declarations. This is looking at code that I know have these for loop declarations (blosc filter). Therefore I don't think we need to remove this warning at this time and still allow for loop declarations.
Let's start by implementing for loop declarations and then in a few months take the next step if we all agree?