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.
dberlin@linux:~> icpc cpp.cpp cpp.cpp(3): error: duplicate parameter name int sum(int x, int x); ^ compilation aborted for cpp.cpp (code 2) dberlin@linux:~> icpc -V Intel(R) C++ Compiler for 32-bit applications, Version 8.1 ... I haven't tried earlier versions of Intel C++, but Comeau's online tester gives the same results for all the versions they have online.
correct. there is a related bug in that we fail to compile things like void foo (int x, int ary[sizeof(x)]);
And there is already a dup of this bug, PR 13717. *** This bug has been marked as a duplicate of 13717 ***