Re: Kernel 2.2.17 with RedHat 7 Problem !

From: David Wragg (dpw@doc.ic.ac.uk)
Date: Mon Oct 23 2000 - 11:22:07 EST


Aaron Sethman <androsyn@ratbox.org> writes:
> Try compiling the said code with -fno-strict-aliasing, and your problems
> will be solved.

Yes, but I don't think I should have to give gcc flags to get it to
obey the C standard (my example can easily be turned into a
self-contained strictly conforming program, in order to qualify for
the full weight of the standard).

> gcc is doing the right thing, just not what you expected.

gcc is not doing the right thing. My example contains no type punning
or other deviations from ISO C which might warrant
-fno-strict-aliasing. The program should behave as if the assignments
are evaluated sequentially; with this compiler, it does not.

> The kernel already checks to see if gcc can grok -fno-strict-aliasing

Yes, since the kernel needs to say to gcc "I know this code relies on
more than the ISO C semantics, so please be gentle with it".

David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:21 EST