From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5056 invoked by alias); 4 Jan 2003 17:52:29 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 5043 invoked from network); 4 Jan 2003 17:52:28 -0000 Received: from unknown (HELO nile.gnat.com) (205.232.38.5) by 209.249.29.67 with SMTP; 4 Jan 2003 17:52:28 -0000 Received: by nile.gnat.com (Postfix, from userid 338) id 5509EF2D4F; Sat, 4 Jan 2003 12:52:16 -0500 (EST) To: dave@hiauly1.hia.nrc.ca, drepper@redhat.com Subject: Re: Miscompilation of glibc with CVS mainline Cc: aj@suse.de, gcc@gcc.gnu.org, jakub@redhat.com, libc-alpha@sources.redhat.com, martin@v.loewis.de Message-Id: <20030104175216.5509EF2D4F@nile.gnat.com> Date: Sat, 04 Jan 2003 17:52:00 -0000 From: dewar@gnat.com (Robert Dewar) X-SW-Source: 2003-01/txt/msg00145.txt.bz2 > 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!