• 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: How to Fix Warning Message?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to Fix Warning Message?


  • Subject: Re: How to Fix Warning Message?
  • From: Jens Ayton <email@hidden>
  • Date: Fri, 23 Feb 2007 10:44:00 +0100
  • Openpgp: id=84FF254B

Dave:
>
> I get the following warning, but not sure how to set the -O flag. I
> would like it to warn me of un-initialized variables.
>
> cc1plus: warning: -Wuninitialized is not supported without -O
>         cc1plus: warning: -Wuninitialized is not supported without -O
> Build succeeded (1 warning)

In the target settings, set the Optimization Level setting to something
other than None. However, this will mess with debugging. In practice,
it’s probably best to have -Wuninitialized set only on your release
build, and to make a release build every now and then to test for
uninitialized variables. Better, have -Wall set for all builds, in which
case -Wuninitialized will be used if optimization is on. (Why is this
necessary? To quote the gcc man page, “These warnings are possible only
in optimizing compilation, because they require data flow information
that is computed only when optimizing.”)


--
Jens Ayton

Sed quis custodiet ipsos custodes?
 _______________________________________________
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

References: 
 >Templates question (From: Red Marble Games <email@hidden>)
 >Re: Templates question (From: John Daniel <email@hidden>)
 >How to Fix Warning Message? (From: Dave <email@hidden>)

  • Prev by Date: How to Fix Warning Message?
  • Next by Date: Weird Build Problem
  • Previous by thread: How to Fix Warning Message?
  • Next by thread: Weird Build Problem
  • Index(es):
    • Date
    • Thread