Open
Conversation
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.
This commit fixes a compilation error that appears when
gccis set to use the C23 standard.More precisely, the failure happens because C23 introduces a
boolkeyword. See https://gcc.gnu.org/projects/c-status.html#c23.The reason for this PR is that C23 is used as the default language version in gcc version 15. See https://gcc.gnu.org/gcc-15/changes.html#c. Albeit it's quite a new version, it's already used by some.
The explanation for the strange value
202000of the__STDC_VERSION__macro comes from the fact that this internal version was the first one in gcc including thisboolfeature before the official value202311was out. In fact, this is the value gcc 14 returns for c23 but, since the version are monotonic numbers, this shouldn't be an issue. There is a more thorough explanation in https://stackoverflow.com/questions/78581920/what-is-the-stdc-version-value-for-c23.