From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48345 invoked by alias); 9 May 2016 22:15:57 -0000 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 Received: (qmail 48330 invoked by uid 89); 9 May 2016 22:15:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 09 May 2016 22:15:46 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1aztSp-0004X6-9z from joseph_myers@mentor.com ; Mon, 09 May 2016 15:15:43 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Mon, 9 May 2016 23:15:41 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.86_2) (envelope-from ) id 1aztSm-00070S-PF; Mon, 09 May 2016 22:15:40 +0000 Date: Mon, 09 May 2016 22:15:00 -0000 From: Joseph Myers To: Marek Polacek CC: GCC Patches , Richard Biener Subject: Re: [C PATCH] Warn for optimize attribute on decl after definition (PR c/70255) In-Reply-To: <20160509144510.GA20450@redhat.com> Message-ID: References: <20160509144510.GA20450@redhat.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2016-05/txt/msg00666.txt.bz2 On Mon, 9 May 2016, Marek Polacek wrote: > In this PR, Richi pointed out that we don't warn for the case when a > declaration with attribute optimize follows the definition which is lacking > that attribute. This patch adds such a warning. Though the question is > whether this shouldn't apply to more attributes than just "optimize". And, > as can be seen in the testcase, we'll warn for even for the case when the > definition has > optimize ("no-associative-math,O2") > and the declaration > optimize ("O2,no-associative-math") > Not sure if we have something better than attribute_value_equal, though. > > (The C++ FE lacks these kind of warnings; I opened PR71024 for that.) > > Bootstrapped/regtested on x86_64-linux, ok for trunk? OK. -- Joseph S. Myers joseph@codesourcery.com