Need some clarification about optimization flags, what "exactly" does -O1 do?

Andrzej Giniewicz gginiu@gmail.com
Fri Nov 28 10:54:00 GMT 2008


Hi,

> Yeah, but that bug almost certainly isn't in the code you're looking at.
>
> I've recently seen a bug that was triggered by -O in an enum where the
> declaration was:
>
>   enum Cell {
>    Cell_0
>   };
>
> and gcc quite correctly assumed that a Cell could only have one value.
>
> I'm not saying I'm absolutely certain this isn't a bug in gcc.  It's just
> that it probably isn't.

interesting, seems like something similar, any hints how to start
tracking real issue?

thanks in advance for your help,
Andrzej.

btw... I found the flag... - well, kind of... -O0 and -O0 -ftree-dce
and -O1 -fno-tree-dce all works, but -O1 as stated before don't... so
I can workaround the issue just for now with -fno-tree-dce until real
one is found - this gives me some more time :)



More information about the Gcc-help mailing list