------- Comment #6 from truedfx at gentoo dot org 2006-07-02 08:44 -------
> This code is not invalid, and G++ is correct to accept it.
>
> DR68 permits this grammatical production and typedef-names for classes are
> class-names.
Does that mean this code is valid, too?
typedef class A {} a;
class B {
friend class a;
};
GCC 4.1.1 rejects it with error: using typedef-name ‘a’ after
‘class’.
And if it is valid, should a new bug be opened for it?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21498