The following core language defect has status c++11 but is not implemented yet: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#355 Without implementing this fix gcc doesn't fully support c++11 syntax.
The DR says GCC didn't warn back in 2002, but this has been rejected since at least 4.3.6 so we must have changed it, in the wrong direction.
testcase: struct A; struct ::A { }; namespace B { struct A; } struct ::B::A { }; Looks the error message was added with the new parser in GCC 3.4.0. The fix might be easy but I have not tested it to see if there is any regressions. That is remove the following code from parser.c: /* Issue the error about the overly-qualified name now. */ if (qualified_p) { cp_parser_error (parser, "global qualification of class name is invalid"); type = error_mark_node; goto out; } else
*** Bug 95610 has been marked as a duplicate of this bug. ***
Since the defect report says it work in GCC at the time I am going to assume this actually did and it was introduced by the new parser so this is a regression.
GCC 9 branch is being closed
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
GCC 10 branch is being closed.
GCC 11 branch is being closed.