Jim Meyering wrote:
> Paolo Bonzini <[EMAIL PROTECTED]> wrote:
>
>> Jim Meyering wrote:
>>> Paolo Bonzini <[EMAIL PROTECTED]> 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