This testcase:

struct foo { };
struct bar { };

struct baz {
  static foo (bar)();
};

confuses cp_parser_constructor_declarator_p, which just looks as far as foo
(bar) before deciding incorrectly that this is a constructor declarator.

This is related to PR 38278, but is a much older issue; it fails as far back as
3.4, though 3.2 seems to accept it.


-- 
           Summary: g++ fails to parse a member function with a
                    parenthesized type name as its declarator
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jason at gcc dot gnu dot org


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

Reply via email to