Re: Looking at self = [super init].
Re: Looking at self = [super init].
- Subject: Re: Looking at self = [super init].
- From: Charles Srstka <email@hidden>
- Date: Wed, 03 Jun 2015 14:10:55 -0500
> On Jun 3, 2015, at 8:02 AM, Alex Zavatone <email@hidden> wrote:
>
> On Jun 2, 2015, at 3:13 PM, Charles Srstka wrote:
>
>> On Jun 1, 2015, at 11:43 PM, Britt Durbrow <email@hidden> wrote:
>>>
>>> Although I have the luxury of requiring modern runtime capable systems, some people do still have to target the old runtime…
>>
>> ARC requires the modern runtime, which has pretty much caused the old one to drop off the map for most people, I think.
>>
>>> Also, FWIW the modern runtime only handles same-named instance variables that are privately declared; same-named variables declared in an @interface section will conflict even on the modern runtime.
>>
>> Variables declared in an @interface section trigger a compiler warning:
>>
>> warning: declaration of instance variables in the interface is deprecated [-Wobjc-interface-ivars]
>>
>>> Oh, and there’s a nifty warning that’s thrown as soon as you try to declare a local variable of the same name as an instance variable.
>>
>
> OK. This is very important to me. Where in the project can I set these flags so that they are project wide (or remove these flags) so that we get those warnings. Project > Target > Build Settings - But under which section?
>
> I have a metric crapload of these to sort out as time permits and would LOVE to turn on these warning flags so I can bring this part of project up to 2012 standards, and then maybe eventually to 2015 standards.
>
> But one step at a time.
What I do is to put -Weverything in “Other Warning Flags”. Then, I add -Wno flags for all the ones I want to turn off (and trust me, there’ll be a bunch of those). Then, at the end, you have a string that you can just copy and paste into your new projects and get the warnings set up exactly how you like them, and you’ll get new warnings as soon as they’re added to Clang.
There is one hitch here, which is that you have to make sure there aren’t any flags set to “No” in the build settings for Warnings, because each one of those adds a -Wno of its own to the build command.
Charles
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden