From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8512 invoked by alias); 25 Dec 2010 15:54:52 -0000 Received: (qmail 8504 invoked by uid 22791); 25 Dec 2010 15:54:51 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 25 Dec 2010 15:54:46 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBPFsiUh006943 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 25 Dec 2010 10:54:44 -0500 Received: from [127.0.0.1] (ovpn-113-106.phx2.redhat.com [10.3.113.106]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oBPFsixv020905; Sat, 25 Dec 2010 10:54:44 -0500 Message-ID: <4D1613C3.7020905@redhat.com> Date: Sun, 26 Dec 2010 09:50:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Kai Tietz CC: GCC Patches Subject: Re: [patch c++]:PR/15774 - Conflicting function decls not diagnosed (this time really for 15774) References: <4D1510FA.4030605@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-12/txt/msg01842.txt.bz2 On 12/24/2010 05:24 PM, Kai Tietz wrote: > Ok, I'll apply it tomorrow. No the error message doesn't display the > attribute as it displays a decl. This would be possibly another task > to display attributes (at least a wished limited set) also for > declarations. I think we want to print whatever attributes cause the attributed entity to be considered distinct from the non-attributed version, rather than a redeclaration. Thinking about it that way, I think your patch actually isn't the right way to handle this: in pr15774-1.C, the two foos are the same foo, just the change in attributes is ill-formed. So decls_match should return 1, but we should complain about attribute mismatch in duplicate_decls, perhaps just before the call to merge_decl_attributes. Jason