This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: g++-4.0.3: program output is different when compiled with -O3 (did not happen with gcc-3.4.5)
- From: Erik <freeciv at home dot se>
- To: John Love-Jensen <eljay at adobe dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Tue, 16 May 2006 14:02:21 +0200
- Subject: Re: g++-4.0.3: program output is different when compiled with -O3 (did not happen with gcc-3.4.5)
- References: <C08F1D26.10592%eljay@adobe.com>
John Love-Jensen wrote:
Well, I suppose it is a tradeoff between correct code that works-but-is-slow
and incorrect code that is fast-and-doesn't-work.
The fast code works, but not with gcc-4.0, -O3 and strict aliasing.
Since there is a fast way to do it, and it works, it is a pity that it
can not be easily used. Especially since it is such an easy problem; to
create an ordering functor for a 32-bit type consisting of 2 16-bit types.