On Jun 3, 2015, at 9:02 AM, Alex Zavatone wrote: > > On Jun 2, 2015, at 3:13 PM, Charles Srstka wrote: > >> On Jun 1, 2015, at 11:43 PM, Britt Durbrow >> <bdurb...@rattlesnakehillsoftworks.com> wrote: >>> >> 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.
AHA! I couldn't find out how to add it through the Build Settings, (thanks terrible UI!), but If you want this in your project and your project has a .pch file, you can turn on the warning through a pragma and a clang diagnostic push by adding the code below to your .project wide header file. / AZ @@ 06030215 - Enable warnings on build for private interface variables manually declared in the @interface. # pragma clang diagnostic push # pragma clang diagnostic warning "-Wobjc-interface-ivars" Thanks to Matt Thompson for his pragma article and the Clang docs. http://nshipster.com/pragma/ http://clang.llvm.org/docs/UsersManual.html http://fuckingclangwarnings.com/ Hope this is of use to some of you too. Cheers, Alex Zavatone _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com