[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] ignore-value: new module
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] ignore-value: new module |
Date: |
Fri, 17 Oct 2008 11:15:07 +0200 |
User-agent: |
Thunderbird 2.0.0.17 (Macintosh/20080914) |
Jim Meyering wrote:
> Paolo Bonzini <address@hidden> wrote:
>
>> Jim Meyering wrote:
>>> Paolo Bonzini <address@hidden> wrote:
>>>> Jim Meyering wrote:
>>>>> I wanted to ignore some new warnings in coreutils,
>>>>> but a "(void)" cast no longer does the job with the latest gcc
>>>>> and libc headers.
>>>> Do you have a reduced testcase?
>>> No, but I will add one.
>> I meant a testcase for (void) not doing its job.
>
> Sure. Just change the above to use "(void)" in place
> of the call to ignore_value:
>
> $ cat in.c
> int f (void) __attribute__ ((__warn_unused_result__));
> void g (void) { (void) f (); }
> $ gcc -Werror -c in.c
> cc1: warnings being treated as errors
> in.c: In function 'g':
> in.c:2: error: ignoring return value of 'f', declared with attribute
> warn_unused_result
Found it in the GCC bug database, it is
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35579
I marked it as a regression, maybe it helps.
Paolo
- [PATCH] ignore-value: new module, Jim Meyering, 2008/10/17
- Re: [PATCH] ignore-value: new module, Paolo Bonzini, 2008/10/17
- Re: [PATCH] ignore-value: new module, Jim Meyering, 2008/10/17
- pragma GCC diagnostic, Bruno Haible, 2008/10/17
- Re: pragma GCC diagnostic, Manuel López-Ibáñez, 2008/10/17
- Re: pragma GCC diagnostic, Jim Meyering, 2008/10/17
- Re: pragma GCC diagnostic, Jim Meyering, 2008/10/17
- Re: [PATCH] ignore-value: new module, Paolo Bonzini, 2008/10/17
- Re: [PATCH] ignore-value: new module, Jim Meyering, 2008/10/17
Re: [PATCH] ignore-value: new module, Jim Meyering, 2008/10/17
Re: [PATCH] ignore-value: new module, Bruno Haible, 2008/10/17