bug-gnulib
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]