Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prevent warnings on forward struct declaration



> On Nov 26, 2005, at 3:22 AM, Trygve Inda wrote:
>>> you could just forward declare:
>>> 
>>> struct SomeControlBlock;
>>> 
>> 
>> 'tis the solution. Xcode is not real fun after something like a
>> decade with
>> CW.  ;-)
> 
> Actually, in this case it is GCC doing the warning... not Xcode.
> There is a good reference here about suppressing warnings:
> 
> http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/gcc/
> Warning-Options.html#Warning-Options
> 
> I don't know which one will kill your warning but -w surely will.
> 
> That said, you would be crazy to use -w in production code.   Your
> best bet is to go -Wall (or -Wmost) to turn on most of the warnings
> the compiler can emit and then do -Werror to turn your warnings into
> build breaking errors.  Then fix the code.  You will better off in
> the long run if you pay attention to compiler warnings.  See item 48
> of Scott Meyers Effective C++, 2nd Edition for more detail about this.
> 
> Ray
> 

Yep... Not interested in turning off all (or even most) errors... But
couldn't seem to sort that one out. Got rid of all errors except that one -
now no more errors (just as it was in CW).

All is well now tho. Thanks!

:-)

Trygve


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.