https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124601
Bug ID: 124601
Summary: misleading 'alignof' diagnostic for alignas(void)
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: cobol
Assignee: unassigned at gcc dot gnu.org
Reporter: yronglin777 at gmail dot com
Target Milestone: ---
GCC emit an misleading diagnostic for the following code:
```cpp
class alignas(void) A {};
```
```
<source>:1:15: error: invalid application of 'alignof' to a void type
1 | class alignas(void) A {};
| ^~~~
Compiler returned: 1
```
https://godbolt.org/z/8exT8366c