From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2794 invoked by alias); 8 Jan 2009 19:16:30 -0000 Received: (qmail 2262 invoked by alias); 8 Jan 2009 19:16:13 -0000 Date: Thu, 08 Jan 2009 19:16:00 -0000 Message-ID: <20090108191613.2261.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/38764] bogus 'changes meaning' error? In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-01/txt/msg00884.txt.bz2 ------- Comment #3 from pinskia at gmail dot com 2009-01-08 19:16 ------- Subject: Re: New: bogus 'changes meaning' error? On Jan 8, 2009, at 4:22 AM, "pluto at agmk dot net" wrote: > following code snipet is reducted testcase from external application. > g++ and comeau online accept/reject source differently. > > template < class T > > struct A > { > }; > template < class U > > struct B > { > #if 1 > typedef A< float > A; // <-- accepted by comeau but... > // g++: error: declaration of typedef struct A B::A > // g++: error: changes meaning of A from struct A > #else > typedef ::A< float > A; // <-- accepted by g++ but... > // comeau: class member typedef may not be redeclared > // typedef ::A< float > A; > // ^ > #endif > }; GCC is correct. This code is invalid but the standard says for this case no diagnostic is required so both compilers are correct according to the standard. Just that edg could be enchened to error about this case. > > > > -- > Summary: bogus 'changes meaning' error? > Product: gcc > Version: 4.3.3 > Status: UNCONFIRMED > Severity: normal > Priority: P3 > Component: c++ > AssignedTo: unassigned at gcc dot gnu dot org > ReportedBy: pluto at agmk dot net > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38764 > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38764