This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17786] New: Duplicate parameter names not diagnosed in declarations.
- From: "rth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Oct 2004 22:50:36 -0000
- Subject: [Bug c++/17786] New: Duplicate parameter names not diagnosed in declarations.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
struct S { int sum(int x, int x); };
By my reading of [dcl.fct]/8, "... since it goes out of scope at the end of the
function declarator ..." implies that we *should* be treating this as a proper
scope and not ignoring the duplicate decl.
DannyB sez icpc agrees and issues a hard error.
Not a regression; fails as far back as 2.95.
--
Summary: Duplicate parameter names not diagnosed in declarations.
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rth at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17786