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