This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Testing build failure with latest GCC


On Thu, May 25, 2017 at 6:50 PM, Steve Ellcey <sellcey@cavium.com> wrote:
> I am building the top-of-tree glibc with top-of-tree gcc and getting
> these messages when running 'make check'.  Should we explicitly ignore
> the return value of fgets in these tests or check it and set 'failed'
> if it is not the expected value?  Or do we think GCC is at fault?  It
> seems like a legimate warning and we do compile with -Wall -Werror.

Any idea why it didn't warn before?

The f* stream functions are special. You can check for errors using
the return value, or using ferror. Therefore, the attribute might not
be correct.

Considering how difficult is to bypass warn-used attribute (a cast to
void is not enough), I wonder if we should drop the attribute.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]