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

Alp Toker alp at nuanti.com
Mon Jul 14 11:24:31 PDT 2014


On 12/07/2014 21:22, Sylvestre Ledru wrote:
> 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.  :)

r212964!

>
> Sylvestre

-- 
http://www.nuanti.com
the browser experts




More information about the cfe-commits mailing list