-O2 and volatile

Eljay Love-Jensen eljay@adobe.com
Thu Oct 2 11:43:00 GMT 2003


Hi Marcus,

Can you post a small, complete code example that exhibits the broken behavior you mentioned?

Which version of GCC?  On what platform?

Have you looked at the assembly output (.s file extension), using the "-save-temps" flag, to see which variables GCC took the liberty to eliminate?

In my experience, sometimes the errant behavior (presuming its GCC and not the code ... which it sometimes has been a flaw in GCC) can be corrected by using the appropriate "-fno-fubaroptimization".

Thanks,
--Eljay




More information about the Gcc mailing list