On 20 September 2015 at 23:40, Manuel López-Ibáñez
<lopeziba...@gmail.com> wrote:
> On 20 September 2015 at 22:32, Christophe Lyon
> <christophe.l...@linaro.org> wrote:
>> On 25 May 2015 at 22:16, Manuel López-Ibáñez <lopeziba...@gmail.com> wrote:
>>> On 25 May 2015 at 21:56, Marek Polacek <pola...@redhat.com> 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
> ===================================================================
> --- 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.

Reply via email to