r194403 - Using an invalid -O falls back on -O3 instead of an error
Chandler Carruth
chandlerc at google.com
Mon Nov 11 11:35:13 PST 2013
On Mon, Nov 11, 2013 at 11:01 AM, Sylvestre Ledru <sylvestre at debian.org>wrote:
> Using an invalid -O falls back on -O3 instead of an error
>
> Summary:
> Currently with clang:
> $ clang -O20 foo.c
> error: invalid value '20' in '-O20'
>
> With the patch:
> $ clang -O20 foo.c
> warning: invalid value '20' in '-O20'. Fall back on value '3'
>
Sorry that I missed the original thread here, but why is this the desired
behavior?
My preference would be to have '-O' be the fallback, and that in turn be
equivalent to '-O2' which is often viewed as a reasonable default level of
optimization.
I just don't like reading too munch into invalid numbers given to -O...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131111/85e93602/attachment.html>
More information about the cfe-commits
mailing list