• 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
Per-file Warnings suppression?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Per-file Warnings suppression?


  • Subject: Per-file Warnings suppression?
  • From: David Hoerl <email@hidden>
  • Date: Wed, 01 Oct 2008 09:56:22 -0400

I use a xcconfig file for all my projects which includes:

GCC_WARN_SHADOW = YES

One set of header files I must include for one file uses "pi" within a structure, so I get this error every time I compile the file:

/usr/local/include/xxx/yyy:674: warning: declaration of 'pi' shadows a global declaration


I'd prefer to get a clean compile (since others see the output!), but I cannot find a way to suppress a warning for this flag (which translates to -Wshadow).


I understand I can remove the warning from the xcconfig file, and then add it to each of my other source files, but then I have to always remember to do this when I add a new file. [Plus, this is just a pita.]

The "Xcode Build System Guide", in "Per-File Compiler Flags", mentions this exactly "For example, ... whose warnings you want the compiler to ignore." but the example only shows a "-W..." addition.

[I tried +Wshadow, no good. Also looked at the GNU Manual, nothing of use found there either.]

Did I miss something?


David _______________________________________________ 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: Per-file Warnings suppression?
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: [Xcode-users] dylib Version Introspection?
  • Next by Date: Re: Per-file Warnings suppression?
  • Previous by thread: Re: NDA dropped :)
  • Next by thread: Re: Per-file Warnings suppression?
  • Index(es):
    • Date
    • Thread