From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32694 invoked by alias); 2 Jul 2006 08:44:40 -0000 Received: (qmail 32670 invoked by uid 48); 2 Jul 2006 08:44:33 -0000 Date: Sun, 02 Jul 2006 08:44:00 -0000 Message-ID: <20060702084433.32669.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/21498] clause 7.1.5.3/2 of the c++ is not enforced In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "truedfx at gentoo dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-07/txt/msg00026.txt.bz2 List-Id: ------- 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