This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Testing build failure with latest GCC
- From: Steve Ellcey <sellcey at cavium dot com>
- To: Florian Weimer <fweimer at gapps dot redhat dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Thu, 25 May 2017 10:05:17 -0700
- Subject: Re: Testing build failure with latest GCC
- Authentication-results: sourceware.org; auth=none
- Authentication-results: gapps.redhat.com; dkim=none (message not signed) header.d=none;gapps.redhat.com; dmarc=none action=none header.from=cavium.com;
- References: <1495731053.18342.13.camel@cavium.com> <CAO3sB51iTc+MQNEHdLtrcxVXsr+0hYq1VWJzg8xVYesaoaoJRw@mail.gmail.com>
- Reply-to: sellcey at cavium dot com
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Thu, 2017-05-25 at 18:56 +0200, Florian Weimer wrote:
> 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?
No I don't know why it didn't warn before. I assume it is a recent GCC
change but I don't know what change. I'll see if I can track down a
specific change that caused this to start.
> 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.
That is a good point, I thought a '(void)' cast could fix this but I
see that it does not.
Steve Ellcey