r189369 - Warn that -O4 is the same as -O3.

Arthur O'Dwyer arthur.j.odwyer at gmail.com
Fri Aug 30 11:19:41 PDT 2013


On Fri, Aug 30, 2013 at 4:55 AM, Rafael Espíndola
<rafael.espindola at gmail.com> wrote:
>> Maybe we should warn for all integers >= 4 though.
>
> We error for them, which is probably better. Hopefully we can error
> for -O4 in clang 3.5 too.

I guess my email on this subject never went through, so let me say
again: I would like to see -O{any number >= max} treated exactly the
same as -Omax, for GCC compatibility. You have no idea how convenient
it is to be able to write "gcc -O99" and have it just do the right
thing, without having to worry about which version of gcc I'm using.

It's highly *in*convenient to have to remember (or encode in
Makefiles, which is worse) the fact that "-O4" is required for maximum
optimization by Clang 3.4 but causes a fatal error in Clang 3.5.

–Arthur




More information about the cfe-commits mailing list