https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81119
Bug ID: 81119 Summary: gcc 8.0 regression: -Wshadow warns on "typedef struct foo foo;" Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dudul04 at yahoo dot fr Target Milestone: --- Given foo.cpp: typedef struct x x; $ ~/install-gcc-git/bin/g++ -Wshadow foo.cpp -c foo.cpp:1:18: warning: 'typedef struct x x' hides constructor for 'struct x' [-Wshadow] typedef struct x x; ^ I've bisected this to the following commit: commit bba28d3f1cae9215736087201583b8f7d3d75721 Author: nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Tue May 23 21:15:48 2017 +0000 * cp-tree.h (PUSH_GLOBAL, PUSH_LOCAL, PUSH_USING): Delete. * name-lookup.c (create_local_binding): New. (update_binding): New. (pushdecl_maybe_friend_1): Rename to ... (do_pushdecl): ... this. Reimplement. (pushdecl): Adjust. (push_overloaded_decl_1, push_overloaded_decl): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248387 138bc75d-0d04-0410-961f-82ee72b054a4