From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1886 invoked by alias); 8 Jan 2009 19:16:11 -0000 Received: (qmail 1865 invoked by uid 22791); 8 Jan 2009 19:16:10 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-gx0-f16.google.com (HELO mail-gx0-f16.google.com) (209.85.217.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Jan 2009 19:16:05 +0000 Received: by gxk9 with SMTP id 9so6764218gxk.8 for ; Thu, 08 Jan 2009 11:16:03 -0800 (PST) Received: by 10.150.191.15 with SMTP id o15mr2531680ybf.73.1231442162801; Thu, 08 Jan 2009 11:16:02 -0800 (PST) Received: from ?10.99.59.188? ([32.158.222.100]) by mx.google.com with ESMTPS id m30sm3871620elf.12.2009.01.08.11.15.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 08 Jan 2009 11:15:56 -0800 (PST) References: Message-Id: <125D6D5D-4996-43E4-9554-857D53CBA8D8@gmail.com> From: Andrew Thomas Pinski To: "gcc-bugzilla@gcc.gnu.org" In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (iPhone Mail 5G77) Subject: Re: [Bug c++/38764] New: bogus 'changes meaning' error? Date: Thu, 08 Jan 2009 19:16:00 -0000 Cc: "gcc-bugs@gcc.gnu.org" X-IsSubscribed: yes 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/msg00883.txt.bz2 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 >