Language.C.Parser.Lexer: accept C23 bool keyword #104
Open
sternenseemann wants to merge 2 commits intovisq:masterfrom
Open
Language.C.Parser.Lexer: accept C23 bool keyword #104sternenseemann wants to merge 2 commits intovisq:masterfrom
sternenseemann wants to merge 2 commits intovisq:masterfrom
Conversation
- This requires naming the int128 token correctly in tokenlist.txt. - The #ifdef needs to be restored manually after generation, unfortunately. - CTokFloatN 16 moves around, but stays within the #ifdef - CTokBFloat16 moves around, but stays outside the #ifdef
C23 makes bool a proper keyword and C preprocessors will no longer expand it to `_Bool` which remains a valid alias. This is relatively simple to support and unbreaks a lot of packages that use c2hs with gcc 15 which defaults to -std=c23. Fixes build of Hackage packages hd5-lite, heystone, nfc, regex-rure.
96d72cb to
3eeb4a5
Compare
Author
|
typedef enum _eq_bool bool; |
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.
C23 makes bool a proper keyword and C preprocessors will no longer
expand it to
_Boolwhich remains a valid alias. This is relativelysimple to support and unbreaks a lot of packages that use c2hs
with gcc 15 which defaults to -std=c23.
It fixes the build of all Hackage packages that use c2hs and break with GCC 15 (heystone, nfc, regex-rure, hd5-lite) except for
avifwhich requires[[nodiscard]].