From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65653 invoked by alias); 31 Jul 2017 22:33:52 -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 65638 invoked by uid 89); 31 Jul 2017 22:33:51 -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,URIBL_RED autolearn=ham version=3.3.2 spammy=complaints, systematic 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 ESMTP; Mon, 31 Jul 2017 22:33:50 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1dcJG0-0002hg-V3 from joseph_myers@mentor.com ; Mon, 31 Jul 2017 15:33:48 -0700 Received: from digraph.polyomino.org.uk (137.202.0.87) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Mon, 31 Jul 2017 23:33:46 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.86_2) (envelope-from ) id 1dcJFt-0004Ye-V4; Mon, 31 Jul 2017 22:33:42 +0000 Date: Mon, 31 Jul 2017 22:33:00 -0000 From: Joseph Myers To: Marek Polacek CC: GCC Patches Subject: Re: C PATCH to detect clashing attributes (PR c/81544) In-Reply-To: <20170725153831.GG3397@redhat.com> Message-ID: References: <20170725153831.GG3397@redhat.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2017-07/txt/msg02077.txt.bz2 On Tue, 25 Jul 2017, Marek Polacek wrote: > PR c/81544 complaints that we aren't detecting clashing noreturn / > warn_unused_result attributes so this patch adds that checking. Martin > plans to do more systematic checking in this area but meanwhile we > might want to go with this. > > Bootstrapped/regtested on x86_64-linux, ok for trunk? I'd expect exactly the same cases to be diagnosed for the two attributes on the same declaration, in either order, whether or not inside a single __attribute__, as are diagnosed when multiple declarations are involved (this applies to all such cases of invalid attribute combinations, not just this one). Whether or not this patch achieves this, the testcase doesn't seem to cover the case of a single declaration with both attributes (and I don't see an existing such test in c-c++-common or gcc.dg either). -- Joseph S. Myers joseph@codesourcery.com