[ODE] SVN: OPCODE compilation flags (erroneous compiler optimizations)

Tanguy Fautre tanguy.fautre at spaceapplications.com
Mon Apr 3 02:52:12 MST 2006


Hi,

I just committed a compilation flag change for OPCODE (on branch 0.6 and 
trunk).

OPCODE does not respect the -fstrict-aliasing rule of GCC (see: man gcc) 
and therefore cannot be compiled using -O2 (which enables the 
-fstrict-aliasing flag).

'cause it has already been pointed in the past that the problem is an 
aliasing issue, I changed the compilation flags from

-O1

to

-O2 -fno-strict-aliasing

This also gives a major hint on where the problem is coming from. If 
anyone feels lucky enough to seek through OPCODE source code.

Hopefully this should give a small performance boost (if anyone can 
confirm it ?).


PS: I compiled and tested ./test_trimesh to see if this was working. No 
problem detected so far.


Tanguy


More information about the ODE mailing list