<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/65557>65557</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Clang cannot use _Atomic qualified integer type as controlling expression in switch statement
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang,
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Christian-Gibbons
      </td>
    </tr>
</table>

<pre>
    Clang cannot use _Atomic qualified integer type as controlling expression in switch statement.
Minimal example program that will fail to compile:
```
#include <stdatomic.h>
#include <stdio.h>
#include <stdlib.h>

int main(void) {
    _Atomic int x = 0;
    switch(x) {
        default:
            break;
 }
    return EXIT_SUCCESS;
}
```
Building with Clang 16.0.6 results in build error with following message:
```
main.c:7:5: error: statement requires expression of integer type ('_Atomic(int)' invalid)
 switch(x) {
    ^      ~
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0k8tu6zYQhp9mtBlEkEhdF1o4vhRddJUW6O6AksbStBTpkFTsbPrshSzDcVMku0MIus3Pwcz3D5X3PBiiBvJnyHeRmsNoXbMdHfvAyjz9wm1rjY9a2783W63MgJ0yxgacPeGPTbATd_g6K81Hph7ZBBrIYXg_ESqPnTXBWa3ZDEiXkyPv2Rpkg_7MoRvRBxVoIhNiSHaQbH5jw5PSSBc1nTThydnBqQnDqAKeWWs8KtYYLHZ2OrEmkJt1JxTJ7Vo_hWTT6bknBLn1oVfXWuMR5P4LBdvvoprbx_D1zibgpNiAqN4s9yBqhPJ5jSHiHdCiuyDIHSYgH-IrBBDV5X9bl9XTUc063FvEh9U6Un9_JINy96FxFGZncP_nr7__ePlju92_vNyVd-EnXs8z636x6cxhxNXqtIiTuEBHftbBL661iwrJOetW4dFqbc_Lvom8V8OXfiyY4g7kpgS5yUFu1izLy30G0NHrzI7846zY43-nCkQForyRBVGxCSBqECWyeVP66sINxTd4Id-vHP_5VG3UN7KvZa0iatKizpKsSlMRjU3a5lVNdZ73MstkWaQyLbL6qDJqqWpFG3EjEiGTOimTJM9TEZcd9VXeHrO6L2RCLWQJTYp1rPXbFFs3ROz9TE2R53kZadWS9teTKES38AchQGxBCENnvEqXP_kucs2S4amdBw9ZotkH_5EzcND0c89qNDvdjCGc_OK2OIA4DBzGuY07O4E4LLXcHk8nZ_-iLoA4XDvwIA7Xfv8NAAD__9ykYQw">