• 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: Enabling language-specific warnings in multi-language projects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enabling language-specific warnings in multi-language projects


  • Subject: Re: Enabling language-specific warnings in multi-language projects
  • From: Eric Albert <email@hidden>
  • Date: Thu, 20 Jul 2006 21:24:20 -0700

On Jul 20, 2006, at 1:54 PM, Sean McBride wrote:

As you may know, gcc has many many compiler warnings available.  Xcode
exposes only a small number of them in its GUI.

For example, there is the -Wdiv-by-zero warning, which can only be
turned on by adding it to 'Other Warning Flags'. Fair enough, but the
problems start with mixed projects. With a project with .c, .cp, .m,
and .mm files and -Wdiv-by-zero one gets:


warning: command line option "-Wdiv-by-zero" is valid for C/ObjC but not
for ObjC++


Urg!  How can I get Xcode to use this warning only with languages that
support it and not give this silly warning otherwise?

One way to do this is to use "Other C Flags" instead of "Other Warning Flags" and then customize "Other C++ Flags" to not contain the flag. It's a bit messy, but it worked for me in a quick test.


Hope this helps,
Eric

_______________________________________________
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: Enabling language-specific warnings in multi-language projects
      • From: "Sean McBride" <email@hidden>
    • Re: Enabling language-specific warnings in multi-language projects
      • From: "Sean McBride" <email@hidden>
References: 
 >Enabling language-specific warnings in multi-language projects (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Question about plists and versions
  • Next by Date: Re: X Code Archives?
  • Previous by thread: Enabling language-specific warnings in multi-language projects
  • Next by thread: Re: Enabling language-specific warnings in multi-language projects
  • Index(es):
    • Date
    • Thread