http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60680

            Bug ID: 60680
           Summary: unqalified-id expected, gcc fails to diagnose and
                    accepts invalid
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: filip.roseen at gmail dot com

Created attachment 32464
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32464&action=edit
testcase.cpp

int main () {
  int(*) = 0;
}

----------------------------------------------------------------------------------

The above compiles but the above is not legal according to any section of the
Standard. `clang` correctly throws out a diagnostic saying that the line in
question is ill-formed.

There are many variations on the above that gcc happily accepts, such as:

`auto(*)(int) = 0`, `auto(*)() = 0`, etc, etc.

Reply via email to