• 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: Predefined compiler symbols
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Predefined compiler symbols


  • Subject: Re: Predefined compiler symbols
  • From: Bryan Pietrzak <email@hidden>
  • Date: Wed, 15 Jun 2005 15:28:57 -0500


On Jun 15, 2005, at 3:06 PM, Chris Espinosa wrote:

On Jun 15, 2005, at 11:21 AM, Dan Grassi wrote:

Now that i386 is in play I need to replace __ppc__ with something else. In one case I have a code file that is common to a Windows project and a Mac project. Based on the destination, Windows or Mac, I need to have different code such as typedefs, #includes, etc. What should I use to distinguish MacOSX?

In general where can I find documentation for predefined compiler symbols?
http://gcc.gnu.org/onlinedocs/gcc-4.0.0/cpp/Common-Predefined- Macros.html

To find out what the settings are for any given compiler version, use the -E -dM options to gcc:

[~] cde% cat > foo.cp
int main(int argc, const char * argv[] {
        return 0;
}

[~] cde% gcc -E -dM foo.cp
#define __DBL_MIN_EXP__ (-1021)

<more snipped>

Yeah, but that list is incomplete. __FILE__ __LINE__ right off the top of my head aren't there. It would be nice, if, in general, there was a one-stop location of all the potential processor symbols.

Bryan

_______________________________________________
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: Predefined compiler symbols
      • From: Clark Cox <email@hidden>
References: 
 >Guard malloc conflicts (From: "Yves Poissant" <email@hidden>)
 >Re: Guard malloc conflicts (From: Chris Friesen <email@hidden>)
 >Predefined compiler symbols (From: Dan Grassi <email@hidden>)
 >Re: Predefined compiler symbols (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: Predefined compiler symbols
  • Next by Date: Re: GCC 4.0 GetKeys() and BigEndianLong for Intel
  • Previous by thread: Re: Predefined compiler symbols
  • Next by thread: Re: Predefined compiler symbols
  • Index(es):
    • Date
    • Thread