[cfe-dev] Question about -Wreadonly-setter-attrs
Jean-Daniel Dupas
devlists at shadowlab.org
Tue Jul 28 08:30:26 PDT 2009
I think we don't talk about the same warning:
IIRC -Wundeclared-selector check if selectors used in @selector()
directives exists, not the warning that clang emits when you call a
method that it could not resolved.
This warning is important too, but ignoring it would not result in
invalid code generation.
Le 28 juil. 09 à 17:19, David Chisnall a écrit :
> I disagree on this one. -Wreadonly-setter-attrs warns that you have
> written something that may be redundant. This is pedantic. In
> contrast, -Wundeclared-selector warns that you have written
> something that may be generating code that will corrupt your stack.
> This is important. Pedantic warnings should not be in the default
> set, important ones should.
>
> David
>
> On 28 Jul 2009, at 16:10, Fariborz Jahanian wrote:
>
>> Agreed. There are two of them that I would like to remove them from -
>> Wmost. The other being -Wundeclared-selector.
>>
>>
>> - Thanks, Fariborz
>>
>>
>> Please remove them
>> On Jul 28, 2009, at 5:56 AM, Jean-Daniel Dupas wrote:
>>
>>> Hello,
>>>
>>> I have a question about Wreadonly-setter-attrs ( property attributes
>>> 'readonly' and 'retain' are mutually exclusive ). I don't think it
>>> should be enabled by standard warning flags (Wmost, Wall).
>>>
>>> It does not really make sense as declaring a readonly property as
>>> retain or copy is a common and legal practice. It's even required if
>>> you want to be able to use property re-declaration as defined here:
>>>
>>> http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocProperties.html#/
>>> /apple_ref/doc/uid/TP30001163-CH17-SW19
>>>
>>> And so, when this flag is on, it produce a lots of spurious warning
>>> IMHO.
>>>
>>> There may be situation where you want to use it (even if I don't see
>>> one yet), but I think it should only be part of an "extra-extra"
>>> warning group and should not be part of common warnings (-Wmost ? )
>>>
>>>
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
More information about the cfe-dev
mailing list