This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: PATCH COMMITTED: PR 6493: Work around -D_FORTIFY_SOURCE


On Fri, 9 May 2008, Ian Lance Taylor wrote:

> Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu> writes:
>
> > On Fri, 9 May 2008, Ian Lance Taylor wrote:
> >
> >> PR 6493 is about a warning in gold when compiling with
> >> -D_FORTIFY_SOURCE (at least, I assume they are using that -D option,
> >> as otherwise the bug report does not make sense).  In this case gold
> >> is calling write in an error case, so it is correctly ignoring the
> >> return value.  This patch adds some pointless uses of the return value
> >> to avoid the warning.
> >
> > I thought that was what coercion to void was for.
> > It would also have the side-effect of being
> > more informative to subsequent readers.
>
> As you can see in the comment I added in the patch, casting to void
> did not eliminate the warning when using gcc 4.3.0.  This may be a bug
> in gcc 4.3.0; I haven't looked.

Oops.
I should have RTFC.
Sorry about that.
'Tis strange.
It's definitely a bug in something.


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