-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
adding c_std=c2y option for clang #14174
Conversation
Signed-off-by: ajs <sam4lordjesus@outlook.com>
Does c2y work with objective c? I was adding c23 support to meson for objective c but then I came across this PR and noticed it doesn't add anything to objc.py |
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.
Please add this for GCC as well (for >=15.0.0).
For GCC trunk at least, yes. Seems fine for Clang too at a glance. |
Signed-off-by: ajs <sam4lordjesus@outlook.com>
I hadn't checked the c2y status in gcc, and I just confirmed this by comparing the manuals for version 14 and version 15 . I could not test it because I didn't find any container for gcc 15 though. I feel it should surely run without exceptions. Anyone that have compiled gcc 15 in their machine can check this commit. I did test it with gcc 14 in my machine and it works as expected (c2y is not supported, and no other exception is thrown). |
For clang, the std list is defined again in the file |
I'll test it with 15. |
Works, thanks. |
Clang introduced a new standard for C: C2Y. It is available for clang 19 onwards. My commit is simple enough, just adding the std flag to the appropriate version. I did test this successfully on my machine with clang-19 installed, but it is my first commit here.
BTW: I just want to mention that I (coming from CMake) really like meson so much, and I am really grateful to all the wonderful people who are maintaining and have contributed to this project.