[Bug c++/87456] New: Attributes on a global empty statement

aaron.ballman+gcc at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Sep 27 17:49:00 GMT 2018


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

            Bug ID: 87456
           Summary: Attributes on a global empty statement
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aaron.ballman+gcc at gmail dot com
  Target Milestone: ---

GCC rejects the following valid program:
```
[[]];

int main() {}
```
with the error "declaration does not declare anything" on the attribute.
However, this is a valid attribute-declaration and should be accepted.

https://godbolt.org/z/I_7mIg


More information about the Gcc-bugs mailing list