From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122305 invoked by alias); 20 Sep 2015 21:41:40 -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 122295 invoked by uid 89); 20 Sep 2015 21:41:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f181.google.com Received: from mail-wi0-f181.google.com (HELO mail-wi0-f181.google.com) (209.85.212.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 20 Sep 2015 21:41:39 +0000 Received: by wicge5 with SMTP id ge5so92503464wic.0 for ; Sun, 20 Sep 2015 14:41:36 -0700 (PDT) X-Received: by 10.180.206.45 with SMTP id ll13mr9538107wic.6.1442785296018; Sun, 20 Sep 2015 14:41:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.186.214 with HTTP; Sun, 20 Sep 2015 14:40:56 -0700 (PDT) In-Reply-To: References: <20150525195650.GY27320@redhat.com> From: =?UTF-8?B?TWFudWVsIEzDs3Blei1JYsOhw7Fleg==?= Date: Sun, 20 Sep 2015 22:35:00 -0000 Message-ID: Subject: Re: [PATCH c/c++] use explicit locations for some warnings in c-pragma.c To: Christophe Lyon Cc: Marek Polacek , Gcc Patch List , "Joseph S. Myers" , Jason Merrill Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-09/txt/msg01506.txt.bz2 On 20 September 2015 at 22:32, Christophe Lyon wrote: > On 25 May 2015 at 22:16, Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez wrote: >> On 25 May 2015 at 21:56, Marek Polacek wrote: >>> Perhaps we should introduce GCC_BAD_LOC with a location_t argument and = use it >>> here. >> >> Why would we want to obfuscate code like that? I would propose to >> actually remove GCC_BAD completely. >> > Hi > It looks like this patch has finally been committed on 2015-09-18 > (r227923), right? Yes, I had almost forgotten about it. > I'm not sure why, since the 1st warning is xfail. Strange that I missed this, but I can see it now. (Well, not so strange, contrib/compare_tests sometimes produces nonsense) Could you try with this patch? It seems to work for me. I'll commit it as obvious if it works for you too. Index: gcc/testsuite/gcc.dg/pragma-diag-5.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- gcc/testsuite/gcc.dg/pragma-diag-5.c (revision 227932) +++ gcc/testsuite/gcc.dg/pragma-diag-5.c (working copy) @@ -1,6 +1,7 @@ /* { dg-do compile } */ -#pragma GCC diagnostic /* { dg-warning "24:missing" "missing" { xfail *-*-* } } */ +#pragma GCC diagnostic /* { dg-warning "missing" "missing" } */ +/* { dg-warning "24:missing" "missing" { xfail *-*-* } 2 } */ #pragma GCC diagnostic warn /* { dg-warning "24:expected" } */ #pragma GCC diagnostic ignored "-Wfoo" /* { dg-warning "32:unknown" } */ Cheers, Manuel.