-
Notifications
You must be signed in to change notification settings - Fork 56
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
Implement more C23 changes #535
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0b621ed
Preprocessor: implement `__has_c_attribute`
Vexu cecbb57
Parser: deprecate K&R style function definitions
Vexu 97c3de2
Parser: implement typeof_unqual
Vexu 08bde2c
Parser: allow labels at end of block in C23
Vexu a7f0cbd
replace uses of c2x with c23
Vexu 1c9e023
Parser: add warning for using UTF-8 char literal before C23
Vexu 52e6e64
Preprocessor: implement embed parameters
Vexu effb484
Parser: allow storage class specifiers on compound literals
Vexu caa7832
Preprocessor: implement `__VA_OPT__`
Vexu 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//aro-args -std=c2x | ||
#if defined __has_c_attribute | ||
# if __has_c_attribute(fallthrough) | ||
#error attribute exists | ||
# endif | ||
# if __has_c_attribute(does_not_exist) | ||
#error attribute exists | ||
# endif | ||
#endif | ||
|
||
#define EXPECTED_ERRORS "__has_c_attribute.c:4:8: error: attribute exists" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//aro-args -std=c2x | ||
int foo(a, int b, char c, d) | ||
int a; short d; | ||
{ | ||
return a; | ||
} | ||
|
||
int baz() { | ||
return bar(1); | ||
// TODO no return-type warning | ||
} | ||
|
||
#define EXPECTED_ERRORS "kr_def_deprecated.c:2:9: error: unknown type name 'a'" \ | ||
"kr_def_deprecated.c:2:27: error: unknown type name 'd'" \ | ||
"kr_def_deprecated.c:9:12: error: use of undeclared identifier 'bar'" \ | ||
"kr_def_deprecated.c:11:1: warning: non-void function 'baz' does not return a value [-Wreturn-type]" \ |
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.
Looks like a small typo in the error message -
s/to without/to a function without/
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.
Looks like I copied Clang's bugs too.Never mind it was my fault for removing the function name from the error. Thanks, fixed.