[cfe-dev] Warning flag for attribute warnings

Jordan Rose jordan_rose at apple.com
Tue Jul 10 18:14:29 PDT 2012

On Jul 10, 2012, at 1:23 PM, Richard Smith wrote:

> On Tue, Jul 10, 2012 at 10:32 AM, Tanya Lattner <lattner at apple.com> wrote:
>> I've added a new warning for an OpenCL attribute and it needs to go under a flag. I noticed that in the Misc/warning-flags.c test there are a bunch of attribute warnings that do not have flags.
>> I think that the group "IgnoredAttribute" would apply to the warning I added and the following below as most are because the attribute is incorrectly applied and therefore ignored.
>> Please let me know what you think and I'll go clean these up. 
> I think we'd benefit from a distinction between "your code is broken: the attribute is ignored because it is being used incorrectly" and "we think your code is fine but we do not support this attribute here" -- but we don't currently have such a distinction so I think the change you're proposing is fine.

I agree with Richard on both counts, though the only true "ignored" (and not invalid) attribute warning I see is warn_unhandled_ms_attribute_ignored. So I think we can stick with IgnoredAttributes for now.

Thank you for finding all the similar ignored/invalid attribute warnings!

More information about the cfe-dev mailing list