On Mar 28, 2014, at 4:16 PM, jahanian <[email protected]> wrote:

> Thanks Nico for our quick feedback. Our thinking is currently to allow extra 
> paren around the selector name
> to suppress the warning. In addition, the warning will have the fix-it to 
> suggest how to suppress the warning.
> 
> For example:
>   @selector((“selector”))
> 
> This is precedented by -Wparenthesis:
>  if ((p = foo()) { … }
> 
> In the meantime, I will  revert the revert till I get the time to implement 
> this (or any other proposal).
> 
> - Fariborz
> 
> On Mar 28, 2014, at 11:59 AM, Nico Weber <[email protected]> wrote:
> 
>> Can you share the idea for the fix-it? And maybe this shouldn't be on by 
>> default until the fix-it is implemented?
>> 
>> As is, this will warn if someone writes @selector(length) and includes 
>> Cocoa, which doesn't seem very unlikely – and warning on that without a 
>> workaround doesn't seem useful.

Btw, maybe length with conflicting result type is not a good idea after all and 
its use in @selector causes undefined behavior.
You may want to bring it up with Cocoa folks. Warning, after all, might have 
had some value.

- Fariborz

>> 
>> (Also, it'd be nice if the discussion was on-list.)
>> 
>> 
> 
> 
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to