https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116532

            Bug ID: 116532
           Summary: GCC accepts invaild static int iarr2 alignas(16)
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jlame646 at gmail dot com
  Target Milestone: ---

GCC accepts invalid program shown below. https://godbolt.org/z/df95YbKW1

```
static int iarr2 alignas(16); //accepted by all gcc,clang and msvc
```
This is not allowed by current grammar as explained here
https://stackoverflow.com/questions/42692058/why-doesnt-alignas-compile-when-used-in-a-static-declaration-with-clang

Reply via email to