From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52327 invoked by alias); 21 Sep 2015 00:22:15 -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 52317 invoked by uid 89); 21 Sep 2015 00:22:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f53.google.com Received: from mail-qg0-f53.google.com (HELO mail-qg0-f53.google.com) (209.85.192.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 21 Sep 2015 00:22:13 +0000 Received: by qgt47 with SMTP id 47so78090036qgt.2 for ; Sun, 20 Sep 2015 17:22:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=EbsQAaQ16Xn2UfUpytInq+tNVPTvz3DliP8eQaNGvys=; b=lpIqXX0eaBLD7qLOpH5rfB67HJ+2+D5hZZIL1vMoehbYsLDl1Qg99mbqmFx49BqX56 7x4NIXReV4+HLEx+SkXGWlBkxKok/7fDIHrOIMQREn6+aS3LNoZeFeZMeMIlC3YkcQdT 7vyr2lCbmH4vX6ntgcL6YLg1vi7uVsNf8d03flbJks4k4dsu6nZGyupo0+1uz8c3oEVT 4ysgjqGYyJfoBwojiB9G8JsWLk2e+YKGyMicuV958LmMmZjo5kwIbLaXjq4CK/yw6I9E QnYwHGdfexxV3S6pwtXoB87tOvi1ktTY+4wDc41rwfIGX87kiPSZn34XdkZEXi232XZ6 qadQ== X-Gm-Message-State: ALoCoQnTEn5QAb4wxaMUc8gAeOQoppXB53CPzT+IrMCBwfsrDNESjC23yUSMtsHneFIkgAXJSPWQ MIME-Version: 1.0 X-Received: by 10.140.20.168 with SMTP id 37mr19388384qgj.16.1442794931766; Sun, 20 Sep 2015 17:22:11 -0700 (PDT) Received: by 10.140.44.10 with HTTP; Sun, 20 Sep 2015 17:22:11 -0700 (PDT) In-Reply-To: References: <20150525195650.GY27320@redhat.com> Date: Mon, 21 Sep 2015 00:24:00 -0000 Message-ID: Subject: Re: [PATCH c/c++] use explicit locations for some warnings in c-pragma.c From: Christophe Lyon To: =?UTF-8?B?TWFudWVsIEzDs3Blei1JYsOhw7Fleg==?= Cc: Marek Polacek , Gcc Patch List , "Joseph S. Myers" , Jason Merrill Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg01510.txt.bz2 On 20 September 2015 at 23:40, Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez wrote: > 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 } */ It works for me if I replace 24 by 62. Christophe. > > #pragma GCC diagnostic warn /* { dg-warning "24:expected" } */ > > #pragma GCC diagnostic ignored "-Wfoo" /* { dg-warning "32:unknown" } */ > > Cheers, > > Manuel.