https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104379
Bug ID: 104379 Summary: [p/10/11/12 Regression] -Wshadow warning given three times Product: gcc Version: 11.2.1 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- struct S { int x; S(int x) { (void)x; } }; shad.C: In constructor 'S::S(int)': shad.C:3:12: warning: declaration of 'x' shadows a member of 'S' [-Wshadow] 3 | S(int x) { (void)x; } | ^ shad.C:2:7: note: shadowed declaration is here 2 | int x; | ^ shad.C: In constructor 'S::S(int)': shad.C:3:23: warning: declaration of 'x' shadows a member of 'S' [-Wshadow] 3 | S(int x) { (void)x; } | ^ shad.C:2:7: note: shadowed declaration is here 2 | int x; | ^ shad.C: In constructor 'S::S(int)': shad.C:3:23: warning: declaration of 'x' shadows a member of 'S' [-Wshadow] 3 | S(int x) { (void)x; } | ^ shad.C:2:7: note: shadowed declaration is here 2 | int x; | ^