Silence C warning "arrays with different qualifiers"#302
Merged
LecrisUT merged 2 commits intospglib:developfrom Jun 19, 2023
Merged
Silence C warning "arrays with different qualifiers"#302LecrisUT merged 2 commits intospglib:developfrom
LecrisUT merged 2 commits intospglib:developfrom
Conversation
Codecov ReportPatch and project coverage have no change.
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## develop #302 +/- ##
========================================
Coverage 86.09% 86.09%
========================================
Files 23 23
Lines 6069 6069
========================================
Hits 5225 5225
Misses 844 844
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Cristian Le <[email protected]>
- There is no way to disable the specific `arrays with different qualifiers` warnings, and it otherwise produces a warning spam. This is however a bug in the pre C23 standard language and actual C compilers are not using the buggy language - Alternatively remove all warnings in favor of `clang-tidy` Signed-off-by: Cristian Le <[email protected]>
439e337 to
f7a3c48
Compare
lan496
approved these changes
Jun 19, 2023
3 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bumped the C standard used in the CI to C23. This should silence the warning.
~~This is not a viable solution because in practice we should only require C17 or C11 standard for now. I will make a proper warning suppression for these specific warnings. For now I just want to check that in the future it is automatically resolved ~~
So bumping to C23 indeed silences the warning, but it is too early to apply that standard. Instead I've disabled
-Wpedanticwith a TODO for when C23 is applied. Note that #297 is an alternative to the compiler warnings where we have more flexibility to disable these warnings.