From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23214 invoked by alias); 20 Dec 2012 18:24:14 -0000 Received: (qmail 23145 invoked by uid 55); 20 Dec 2012 18:23:56 -0000 From: "dnovillo at google dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55742] __attribute__ in class function declaration cause "prototype does not match" errors. Date: Thu, 20 Dec 2012 18:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dnovillo at google dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-12/txt/msg02032.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55742 --- Comment #4 from dnovillo at google dot com 2012-12-20 18:23:55 UTC --- On Thu, Dec 20, 2012 at 1:21 PM, tmsriram at google dot com wrote: > However, with function multiversioning, this will become a problem as > multiversioning does not treat two decls with different target attributes > as > identical. Since we are enabling multiversioning by default, atleast in > C++ > front-end for now, IMO, it is better to insist that the definition and > declaration contain identical target attributes. Unfortunately, we cannot do that. A lot of existing code relies on this attribute merging. The cleanest approach here is probably to add an additional 'mv' attribute to explicitly enable multiversioning. Breaking the existing semantics is going to break a lot of code. Diego.