<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58638>58638</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
No diagnostic for duplicate alignment specifiers
</td>
</tr>
<tr>
<th>Labels</th>
<td>
enhancement,
c11,
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
AaronBallman
</td>
</tr>
</table>
<pre>
The following code is accepted with no diagnostics, even with `-Wall -pedantic`:
```
_Alignas(int) _Alignas(double) int k;
```
It is correct that we accept this code per C2x 6.7.5p7: "... When multiple alignment specifiers occur in a declaration, the effective alignment requirement is the strictest specified alignment."
It would be nice to warn users that the alignment specifiers request differing alignments and tell them which alignment specification was ignored.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtk8GOnDAMhp8GLtYgCAMDBw4zu1qpl54q7bEKiYG0IWGTMLRvX4fd7UzVkZASx4n9_bbprfzdfZsQBqu13ZQZQViJoDxwIXAJKGFTYQJjQSo-GuuDEj5hT4BXNO--pM4Pr1xrOCwouaELdJKU5yR_TvJz3L9_u_n9rNVoOIVolAkJa-HuRNq11xgPyQc_k_LyMMaXEAGFdQ5FgDDxABt-AJO5-0jEgg6e2C-os1NWLScigoSxLMvgdSL2edVBLZoexvwzUka_oFCDQufBCrE6wgAOEoXmjgdlTRQeqFw4DJRaXe8fO3xblcN9Twjxmg9OiYD-FlneHmQE8yHvU9VmVy2hRzBKIAQLG3cGVh-Bdpkx6EPcmDzmkYrIXOzj32vUSiMhIDWIns-wTUpM_0cRu0DK6IE81qHMUuyKuq6bvGZ1kcqulG3Z8jSooLH7ej8RND8O5LroGOYxYro63U0hLD6OBnuhb6TpWftM2JkMra-fy2Fx9gfVl0zlPemiTdXUZZNOXVU0_bFt8qKQw9CKvsjLfshbMptKiFqkmveofZdUF6ovmokbsfckVpu6R4soijtDczMS0T_TzZLqOVUdyxkrctJ-Oh5ZkfWsbfjQtjwfqhKbIjnmOHOls8icWTemrtvx-3X05NTKB39zcu-pKog7GsXna5is687cWXOh32fmJt3ldrvWP410Md4">