r212805 - GCC compatibility: Create a Group to ignore unsupported optimization.

Sylvestre Ledru sylvestre at debian.org
Sat Jul 12 11:22:08 PDT 2014


On 12/07/2014 09:40, Alp Toker wrote:
>
> On 11/07/2014 14:43, Sylvestre Ledru wrote:
>>   +def warn_ignored_gcc_optimization : Warning<"ignoring unsupported
>> optimization flag '%0'">,
>> +  InGroup<UnusedCommandLineArgument>;
>>   def warn_O4_is_O3 : Warning<"-O4 is equivalent to -O3">,
>> InGroup<Deprecated>;
>>   def warn_drv_optimization_value : Warning<"optimization level '%0'
>> is unsupported; using '%1%2' instead">,
>>     InGroup<InvalidCommandLineArgument>;
>
> Hi Sylvestre,
>
> Logically InvalidCommandLineArgument looks like it'd be slightly more
> suitable than UnusedCommandLineArgument as the group here.
>
> Moving it there will let people turn on
> -Werror=invalid-command-line-argument to get basically the stricter
> behaviour we previously had, or disable with
> -Wno-invalid-command-line-argument if they don't mind silencing
> optimization warnings but still want to keep legitimate unused
> argument warnings. And it aligns well with the existing
> warn_drv_optimization_value.
>
> Patch attached, does this look OK to you?
Right. Thanks.  :)

Sylvestre



More information about the cfe-commits mailing list