From owner-freebsd-stable Sat Apr 28 5:12:16 2001 Delivered-To: freebsd-stable@freebsd.org Received: from bitbucket.extern.uniface.nl (bitbucket.extern.uniface.nl [193.78.88.139]) by hub.freebsd.org (Postfix) with ESMTP id 5FEA937B423 for ; Sat, 28 Apr 2001 05:12:12 -0700 (PDT) (envelope-from driehuis@playbeing.org) Received: from bh2.nl.compuware.com (unknown [172.16.17.82]) by bitbucket.extern.uniface.nl (Postfix) with ESMTP id 646BF8290 for ; Sat, 28 Apr 2001 14:12:10 +0200 (CEST) Received: from trashcan.nl.compuware.com ([172.16.16.52]) by bh2.nl.compuware.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id 26PXH7G2; Sat, 28 Apr 2001 14:12:10 +0200 Received: from c1111.nl.compuware.com (c1111.nl.compuware.com [172.16.16.36]) by trashcan.nl.compuware.com (Postfix) with ESMTP id E6EEA145A4; Sat, 28 Apr 2001 14:12:09 +0200 (CEST) Date: Sat, 28 Apr 2001 14:12:09 +0200 (CEST) From: Bert Driehuis X-Sender: bertd@c1111.nl.compuware.com To: stable@FreeBSD.ORG Subject: Re: Trouble with 4.3-RELEASE compiler In-Reply-To: <3AEA96F8.C217C8BF@cvzoom.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 28 Apr 2001, Donn Miller wrote: > If > you want to make a program run faster, you've got to write implement > better algorithms, and its as simple as that. Beyond that, you'll just > have to get faster HW. This in general is true, but back in the days when GCC was a good C compiler that also had a C++ like frontend, -O2 was safe, and if you saw bugs at -O2, 99 out of a hundred times it was an actual bug in the code that was exposed by the optimisation (usually an uninitialised variable). > I think most compilers have optimization bugs, > because you use them with the understanding that they generate > faster/smaller code at the expense of potential side effects. There is no excuse for generating buggy code. The compiler has to take valid C and produce object code that faithfully implements what the source code describes. If the compiler does not do that, it's broken. BSD/OS for the longest time shipped with two C compilers: gcc 1.42 and gcc 2.x, and to this date, BSD/OS ships with a patched gcc in order to take some broken optimisations out. Cheers, -- Bert -- Bert Driehuis -- driehuis@playbeing.org -- +31-20-3116119 If the only tool you've got is an axe, every problem looks like fun! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message