patch: add GCC bit to Attr.td and use it to disable -Wgcc-compat
Aaron Ballman
aaron at aaronballman.com
Fri Oct 18 10:50:45 PDT 2013
Can this be done as part of the attribute spelling instead of a
separate bit? Eg) introduce GCC as a spelling that implies GNU?
> def Const : InheritableAttr {
> - let Spellings = [GNU<"const">, GNU<"__const">, CXX11<"gnu", "const">];
> + let Spellings = [GNU<"const">, GNU<"__const">, CXX11<"gnu", "const">,
> + CXX11<"gnu", "__const">];
> + let GCC = 1;
> }
This should be a separate patch with a test case for the additional spelling.
> def NoSanitizeAddress : InheritableAttr {
> let Spellings = [GNU<"no_address_safety_analysis">,
> - GNU<"no_sanitize_address">];
> + GNU<"no_sanitize_address">,
> + CXX11<"gnu", "no_address_safety_analysis">,
> + CXX11<"gnu", "no_sanitize_address">];
> + let GCC = 1;
> }
As should this.
Otherwise, patch LTGTM!
~Aaron
On Fri, Oct 18, 2013 at 1:45 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> Can you arrange to only emit the generated function once? Otherwise, lgtm.
>
> On 18 Oct 2013 01:15, "Nick Lewycky" <nlewycky at google.com> wrote:
>>
>> The attached patch refactors a string switch table about attributes into
>> the Attrs.td file. Any behaviour change is incidental (ie., the table was
>> out of sync before this change), this is a refactoring.
>>
>> Please review!
>>
>> Nick
>>
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
More information about the cfe-commits
mailing list