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

Re: Per-file Warnings suppression?


  • Subject: Re: Per-file Warnings suppression?
  • From: Chris Espinosa <email@hidden>
  • Date: Wed, 1 Oct 2008 10:00:37 -0700


On Oct 1, 2008, at 6:56 AM, David Hoerl wrote:

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?

Try adding -Wno-shadow to the per-file Build settings.

" Each of these specific warning options also has a negative form beginning `-Wno-' to turn off warnings; for example, -Wno-implicit."

http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Warning-Options.html#Warning-Options

Chris

 _______________________________________________
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: Brian Stern <email@hidden>
References: 
 >Per-file Warnings suppression? (From: David Hoerl <email@hidden>)

  • Prev by Date: Cocoa Programming iPing exercise
  • Next by Date: Re: NDA dropped :)
  • Previous by thread: Per-file Warnings suppression?
  • Next by thread: Re: Per-file Warnings suppression?
  • Index(es):
    • Date
    • Thread