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: Jim Meyering
Subject: Re: [PATCH] ignore-value: new module
Date: Fri, 17 Oct 2008 11:17:40 +0200

Paolo Bonzini <address@hidden> wrote:

> 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.

Thanks!




reply via email to

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