Compile with latest C standard#621
Merged
Merged
Conversation
C23 made bsearch a const-preserving type-generic macro.
Use latest C standard known to CMake. Remove CMAKE_C_STANDARD_REQUIRED to fall back to earlier versions. AFAIK, there's no way to set the minimum required version. But since we support C99 and it's unlikely that CMake supports C89-only compilers, this shouldn't be a problem.
Contributor
Author
|
Enabling C11 or later causes clang-tidy warnings, suggesting to use C11 Annex K functions like |
Contributor
Author
|
The
I'll prepare another PR to address this. |
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.
The idea is to catch incompatibilites with newer C standards as early as possible.