-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Clang cannot use _Atomic qualified integer type as controlling expression in switch statement #65557
Comments
@llvm/issue-subscribers-clang-frontend |
Also broken in trunk: https://godbolt.org/z/oaTxcG59e |
@llvm/issue-subscribers-c |
It looks like on Godbolt that we have never supported this. |
The C standard requires an integral type for a controlling expression in a switch statement, but I have written a fix for this at https://reviews.llvm.org/D159522. |
FYI: the controlling expression has to be of integer type, but the primary expression |
So this is valid in the C23 standard, good to know! |
Clang cannot use _Atomic qualified integer type as controlling expression in switch statement.
Minimal example program that will fail to compile:
Building with Clang 16.0.6 results in build error with following message:
The text was updated successfully, but these errors were encountered: