Re: How to Fix Warning Message?
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