NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: gcc4 vs gcc3: a case (kerTeX)

On Mar 9, 2011, at 2:58 AM, wrote:
> For example when compiling kerTeX, the results were correct with gcc3.x
> but with NetBSD now gcc4.1.3, the compilation went OK but METAFONT
> (inimf(1)) was now unable to master some instructions (
> It turns out that my CFLAGS were still specifying "-O2" and that the
> result was a mess; while "-O" alone works. I suspect whether FPU
> optimizations (while the D.E. Knuth's programs are integer based, mf(1)
> does a lot of arithmetic (scaled integers) and perhaps some
> optimizations shift to FPU while the code uses carefully structures
> etc.), or some "volatile" that are optimized out.

Does "-O2 -fno-strict-aliasing" work better?

C99's type-punning assumptions (implied by -O2 in gcc-4.x including 
-fstrict-aliasing) aren't safe with older code which worked fine with prior 
versions of the compiler.


Home | Main Index | Thread Index | Old Index