The following should elicit an error during processing of e0's initializer:
namespace N { const int a = 42; enum N { e0 = N::a }; } ... because 3.4.3p1 [basic.lookup.qual] indicates that the enumeration [tag] name N should be found during lookup in the nested-name-specifier and renders the program ill-formed. -- Summary: Error diagnostic not issued for unacceptable result of lookup for a name used in a nested-name-specifier Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: widman at gimpel dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26950