-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Trying to set c_std to 18 and got an error #5539
Comments
Hi @squidfarts I get the same error with Meson v0.50. However, it has been fixed [EDIT: for gcc, but not yet for Clang] with Meson ≥ v0.51 |
Here was the MWE: meson.build project('C18 Standard', 'c', default_options: ['c_std=c18'])
exe = executable('C18program', 'main.c')
test('C18program', exe) main.c int main(void){ return 0; } |
But why do I get this? Michaels-MacBook-Pro:~ shnitzel$ cd Developer/templates/c/ meson.build:39:0: ERROR: Value "c18" for combo option is not one of the choices. Possible choices are: "none", "c89", "c99", "c11", "c17", "gnu89", "gnu99", "gnu11", "gnu17". A full log can be found at /Users/shnitzel/Developer/templates/c/example/build/meson-logs/meson-log.txt I used this: |
OK! Sorry about that I should have asked more about the setup. Thanks! |
Yes, this initially appears to be particular to Clang compiler (not a compiler bug, just doesn't happen with GCC. It was a problem with GCC on Meson 0.50 but not 0.51, while Clang is still broken with 0.51 and master branch.). With Windows and Clang 8.0 and the MWE above I get error:
|
@squidfarts I believe #5560 will solve this issue. Thanks again. |
Your welcome 🙂 |
Sorry to bother you again but the c_std=18 is still showing an error. The same one. I tried the cstd18_bug branch. |
OK so you have AppleClang 10.0.1 there were some suggested changes to #5560 to streamline logic. Maybe I accidentally didn't cover this case with the present logic. Thanks! |
I am trying to set ‘c_std’ to version 18 and it printed an error about that version not being valid. The document on built-in options states that it is.
However the value “c17” is working.
Would this be fixed at some point?
The text was updated successfully, but these errors were encountered: