Simple experiments show that no, there isn't.
Firstly, GCC will issue a proper error message if one uses a plain type
name `A` instead of elaborated type specifier `class A`. So, this is not
just about name `A`, it is specifically about how an *elaborated type
specifier* is treated. This is much more specific, supposedly easier to
research, and I don't see anything in the standard that would provide
special treatment to this situation.
Secondly, here's a slightly different experiment
class A
{
struct X {};
};
class B : A
{
class X x;
};
This example also compiles fine in GCC.
Note that this time there's no "open" access path to `A::X` from
*anywhere*. Regardless of which side you approach it from, `A::X` is
private, private and private. It is hopelessly inaccessible, no matter
how you slice it.
Yet GCC manages to ignore access protection in this example. (Again, for
elaborated type specifier only.)
This is almost certainly a bag-o-feature of GCC. It could have been done
deliberately (although `-pedantic` doesn't help), but there seems to be
nothing in the standard about this kind of special treatment.