<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/147736>147736</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[C23] Clang should silently strip the `_Atomic` qualifier in enums with fixed underlying type
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
MisterDA
</td>
</tr>
</table>
<pre>
```c
/* ISO C23 6.7.3.3-5
The underlying type of the enumeration is the unqualified,
non-atomic version of the type specified by the type specifiers in
the specifier qualifier list. */
enum e : _Atomic int { E };
enum e e;
enum f : const int { F };
enum f f;
```
```
<source>:7:18: error: non-integral type '_Atomic(int)' is an invalid underlying type
7 | enum e : _Atomic int { E };
| ^
1 error generated.
Compiler returned: 1
```
https://godbolt.org/z/Ka35GTTEr
GCC 15 accepts this.
cc @AaronBallman
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMU0GPszYQ_TXDZbTI2BCHAweWDZ-qquqhe68cGMCVY6e2SZv--sqQfNvuXj6EBB7Pe35vZqxC0LMlaqB6heotU2tcnG9-0SGSf2uzsxvvDRzY_g7AWuA98BZ_-u1X7LjAQy5zkYuXKm2xFhHfF8LVjuTNXdsZ4_1K6CaMCyHZ9UJeRe0s6rCFVvvnqoyeNI3Au53BOvuiorvoAW_kQ8p-EGxk4UrDBsDz_WvUB9R250l738P4PMej0SHmCHzzsslOwpAQRIu_t_vJ2kYE-YonBPkG4vUji_bVMzBtsMHZEL-D-k-gCacH6FnKneB_S9EFt_qBQJxAtBJEWxwTNXnvfPpJddE20uyV2U0Dlw-9wI_aRuA1cJlqqyxqe1NGj5-bsdcGJYLs8MeM4_akfKhOwNpi14Qz2dROGnNgbecuV23Io6e4ektjIi2-el5ivAYQ-yD1sxvPzsTc-Rl4_w_w_mclqm_v7ye_p3_rOiwqVMNA15hmRod83xkGhJK1yjv7qoy5KIvZ2IixFrXKqClkxZlk_FhkS1OWJLgqyno61mySXI1MEBPHilfjeSzrTDec8YpJVhdlUfAiF0Ut64NgxXiUUlYllIwuSpvcmNslyc10CCs1RSmlOGRGncmE7RpxPhhlZ-A83SjfJMDLeZ0DlCyNXvigiDqa7e51XED1hl0CYljcakYM2pCN5o4hen3dphkO7NnvA_vPRGu7dTLgXzouOOm_6Uvbs9Wb5lPtdVzWcz64C_A-aXp8Xq7e_UFDBN5vHgPw_mHz1vB_AwAA___Hokb8">