This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17786] New: Duplicate parameter names not diagnosed in declarations.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]