Re: #define bug in gcc for delta builds?
Re: #define bug in gcc for delta builds?
- Subject: Re: #define bug in gcc for delta builds?
- From: Steve Checkoway <email@hidden>
- Date: Wed, 4 Feb 2009 01:52:24 -0800
On Feb 4, 2009, at 12:42 AM, Stephen Northcott wrote:
I have been using #define _FOO_ to conditionally alter the
compilation of parts of a class.
In the .h file I had something like this..
#ifdef _FOO_
int A = 2;
#else
int A = 2;
int B = -1;
#endif // _FOO_
Since header files get copied verbatim into any file that includes
them (and then preprocessed, of course), my first thought is that
you're including this header from two different source files and
that's causing unexpected behavior. Furthermore, it's possible that
one source file defines _FOO_ and the other does not which could lead
to the data offset issues you mentioned, especially if what you are
conditionally defining is part of a struct or class definition.
--
Steve Checkoway
"Anyone who says that the solution is to educate the users
hasn't ever met an actual user." -- Bruce Schneier
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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