On Wednesday 13 April 2005 16:58, Duncan wrote:
> Paul de Vrieze posted <[EMAIL PROTECTED]>, excerpted
>
> below,  on Wed, 13 Apr 2005 11:39:54 +0200:
> > You are a bit wrong here. The -Ox options do not enable features that
> > should be expected to be dangerous. It does however enable features
> > that are in some gcc versions buggy. [] In general there are many
> > different combinations possible for gcc options and some of them only
> > create bugs in interaction with eachother. This leads to the fact
> > that gcc tends to be buggy with the lesser used (or newer) features.
>
> That I can agree with.  I was just going to reply to FlameEyes that if
> indeed any -Ox feature /was/ dangerous on any particular arch, I'd call
> that a gcc bug, which fits in here very nicely.
>
> I wonder about your example, however.  Was sse math enabled (even for
> the P4) with any -Ox option in GCC 3.2.x?  If it was, I'd call that a
> poor decision, because it was too early for that to be used in the
> general -Ox flags.

No, it was enabled with -march=pentium4. The reason that many packages 
(used to) carry "replace-flags -march=pentium3 -march=pentium4" (or 
equivalent).

> OTOH, -funit-at-a-time makes a very good example, because it IS enabled
> by a -Ox option, -Os, as it happens, which is the one under
> discussion...  As I mentioned, this one did have some issues
> originally, but AFAIK, they were more one of bugs in the programs being
> compiled that were never previously caught due to smaller scope, than
> they were GCCs bugs.  (I'm not a GCC dev, so I could be all wet with
> this, but that's how I took what I've read on the subject.)

In that case it is caused by gcc being broken in the effect of not failing 
on illegal code. If you look at it there are two kinds of errors that 
compilers could make. One is to compile correct code wrongly (or reject 
it). The other one is to compile incorrect code. The first one is 
annoying but easilly discovered. The latter one is a subtle bug that can 
lead to all kinds of unexpected behaviour of these programs. 
(unfortunately the C language makes it very hard for compilers to do this 
properly).

Paul

-- 
Paul de Vrieze
Gentoo Developer
Mail: [EMAIL PROTECTED]
Homepage: http://www.devrieze.net

Attachment: pgpy5NIz6ySPM.pgp
Description: PGP signature

Reply via email to