This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Miscompilation of glibc with CVS mainline
- From: dewar at gnat dot com (Robert Dewar)
- To: dave at hiauly1 dot hia dot nrc dot ca, drepper at redhat dot com
- Cc: aj at suse dot de, gcc at gcc dot gnu dot org, jakub at redhat dot com,libc-alpha at sources dot redhat dot com, martin at v dot loewis dot de
- Date: Sat, 4 Jan 2003 12:52:16 -0500 (EST)
- Subject: 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!