• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: pragma nowarn
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pragma nowarn


  • Subject: Re: pragma nowarn
  • From: William Bates <email@hidden>
  • Date: Wed, 12 Dec 2007 06:17:06 -0600

I'd say, "Warnings Are Usually A Good Thing™" But like anything else, they can be overdone. Which is why we have switches to turn them off. We're only taking about the granularity here.
"pragma no warn" is just a comment. Used sparingly, it communicates to other humans (or the code writer, six months later), "I'm doing something tricky here that I've thought about, but the compiler may not get." Then it turns of the darn yellow flag that may well distract attention from real problems.
BTW, Alastair's position (all warnings on all the time) is the same advocated by the author of an Evil Empire Bible, "Code Complete," (Microsoft Press). Heresy, anyone?
IB 3.0 has decided static text needs to be bigger than before, and now generates lots of spurious clipping warnings... a waste of time to "fix" since the complier itself may be 'fixed" next version. Or consider the best way to take advantage of late binding, the essence of Objective C, with constructs like:
if ([myObject respondsToSelector:@selector(optionalMethod:)]) [myObject optionalMethod: param];
without turning off "Incomplete Objective C Protocols" warning....


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: pragma nowarn
      • From: Alastair Houghton <email@hidden>
References: 
 >pragma nowarn (From: William Bates <email@hidden>)
 >Re: pragma nowarn (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: What does "foo.o has local relocation entries in non-writable section (__TEXT,__text)" mean?
  • Next by Date: type checking on enums
  • Previous by thread: Re: pragma nowarn
  • Next by thread: Re: pragma nowarn
  • Index(es):
    • Date
    • Thread