• 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: #define bug in gcc for delta builds?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: #define bug in gcc for delta builds?
      • From: Stephen Northcott <email@hidden>
References: 
 >#define bug in gcc for delta builds? (From: Stephen Northcott <email@hidden>)

  • Prev by Date: Re: Problem with (Saturn) Profiler
  • Next by Date: Re: #define bug in gcc for delta builds?
  • Previous by thread: #define bug in gcc for delta builds?
  • Next by thread: Re: #define bug in gcc for delta builds?
  • Index(es):
    • Date
    • Thread