[Bug c++/38313] New: g++ fails to parse a member function with a parenthesized type name as its declarator
jason at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Nov 28 21:18:00 GMT 2008
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
More information about the Gcc-bugs
mailing list