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

            Bug ID: 78951
           Summary: Attributes allowed in an incorrect position
           Product: gcc
           Version: 7.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: ---

[dcl.type] specifies in what positions an attribute-specifier-seq may appear
within a type-specifier-seq, which is only at the end of the sequence. GCC
silently accepts attributes in an incorrect position within a
type-specifier-seq.

volatile int *ip = new volatile [[]] int [[]];

The first [[]]] should be diagnosed, the second [[]]] is acceptable.

Reply via email to