This is the mail archive of the libc-alpha@sources.redhat.com 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: Miscompilation of glibc with CVS mainline


> If you think about when the "optimization" can be used, it is very
> questionable at best whether it's useful.  Why would anybody add a test
> for a function reference being NULL without the possibility of this
> being the case?  For this reason and the history of code like this gcc
> should never remove the tests and the old behavior should be restored.

One of the most important pieces of documentation is what you did not do
and why you did not do it :-)

In this case, when the optimization is removed (I agree it should be), then
in its place a comment saying why it is not done (perhaps even leaving the
undesirable code commented out) would be helpful to stop people doing this
again!


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