<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/144321>144321</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Compilation error with "alignas"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
8ss-boop
</td>
</tr>
</table>
<pre>
```
#include <stdint.h>
#include <stdarg.h>
void compute_values(int count, ...) {
static _Atomic(int) shared_value = 0;
va_list args;
va_start(args, count);
int temp[16] = {0};
for (int i = 0; i < count && i < 16; i++) {
int val = va_arg(args, int);
temp[i] = (val > 0)
? ((val & 1) ? (temp[i ? i - 1 : 0] + val) : (shared_value += val))
: ((alignas(16) int){ val * -1 });
}
}
```
Compilation error:
```
<source>:16:17: error: expected expression
16 | : ((alignas(16) int){ val * -1 });
| ^
1 error generated.
Compiler returned: 1
```
https://godbolt.org/z/478dvGehr
Is this a bug?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVN2uozgMfhpzYxUlDoRywQX0DKt9iqMAGciKkioJzO4-_SpAO-fMnMutopLYnz9_dn6U92ZctK4gbyB_S9QaJuuqq_eXztpH0tnhnwokOwergYRZ-nkdNIK4-TCYJaQTiG9f-ZQbX759bNYM2Nv7Yw36fVPzqj3Q1SwBe7suAeiGaZoClQhFA6xGRPRBBdPjex3s3fQHPCL8pJweDhYE8YYMxDNmU--z8QGVG_0nqw_KBaDr7qDbM215gE5c1BP0_QF5wyXkbzs7FA2D4u0T8Lt1eOo3Lwn79GRGIAkkTxOXuxuo2cfHIp9pNzXvRJt6V278INR8kPkMODWal0S6HvHfkEXwT2T8gWgj4gkiiXzXcJifXPva4AU5gqiR7dzURGEHuo7oz72n5pAcEV_lrc-8ajbjouKOcxnJzpqK5iibarxwjD1-FRoXrD7_P55CVt_s_WFmFYxdUDtn3Z7nF5i4ebu6XsczKOrY_5oXEfiK0H8_dB_0ECdOe2_scujnEqG44f9VyUFQ3BDyeB34oQBHvWingh7SV0naodNhdYseYkL-e-lTCA8PogZqgdrRDp2dQ2rjeWn_BWqz4jpsf-jJHfA_PYbJeFTYrSOI9rAmQyWGUpQq0RUvcsakzPIsmSrWFd97pcuh63tx7QcmZM601LIr5LXsysRUxChnkktWioxnKe9VKUhwnnecZJ5DxvRdmTmd5-0edSXG-1VXPMsE8WRWnZ79_uIQLfoH7l4gig-Qq2LQpVtHDxmLl9j_pAkmzLr6befxhwkTAtFrWyhZ3Vz90icTprVLe3sHaiPl-bk8nP1L9wGo3YV4oPZUulX0XwAAAP__HNlqNg">