http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57752
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- There's a cross-reference to [basic.scope.hiding] which explains how a class name can be hidden by variables, members and enumerators, and it seems that both G++ and clang interpret [class.derived]/2 to mean only that type of name hiding is ignored, e.g. the variable x is ignored here: struct x {}; namespace { int x = 0; struct y : x {}; }