https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94588
Bug ID: 94588 Summary: Improve redeclared parameter name diagnostic Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- void f (int i) { int i; } is correctly rejected ([basic.scope.param]) but we don't print the previous decl: $ g++ -c p.C p.C: In function ‘void f(int)’: p.C:4:7: error: declaration of ‘int i’ shadows a parameter 4 | int i; | ^