• 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: How can I find out what predefined symbols the compiler is using?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I find out what predefined symbols the compiler is using?


  • Subject: Re: How can I find out what predefined symbols the compiler is using?
  • From: Greg Parker <email@hidden>
  • Date: Thu, 31 Aug 2006 13:06:20 -0700

What I would like to know is how do you determine what the choices are for these types of #defines? The compiler obviously knows about __GNUC__, and maybe __MWERKS__, but is there a way for me to query the compiler about which ones of these it has defined?

Try this in a terminal:

% touch empty.c
% cc empty.c -E -dM -o - | sort
#define _ARCH_PPC 1
#define _BIG_ENDIAN 1
#define __APPLE_CC__ 5419
#define __APPLE__ 1
#define __BIG_ENDIAN__ 1
#define __CHAR_BIT__ 8
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
...

Compiler flags and source language can change the built-in definitions.


(And, what is the proper terminology for these symbols? I would happily google for this info if I knew what to call it.)

They're "preprocessor macros" or "preprocessor defines" (not symbols). "built-in" might also be a useful search term.



-- Greg Parker email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: How can I find out what predefined symbols the compiler is using?
  • Previous by thread: How can I find out what predefined symbols the compiler is using?
  • Index(es):
    • Date
    • Thread