• 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: Clark Cox <email@hidden>
  • Date: Thu, 16 Jun 2005 07:07:53 -0400

On 6/15/05, Bryan Pietrzak <email@hidden> wrote:
>
> 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.

What would you expect the value of __FILE__ or __LINE__ to be? The
former would, obviously, be different for every input file, and the
latter would be different on every line.


--
Clark S. Cox III
email@hidden
http://www.livejournal.com/users/clarkcox3/
http://homepage.mac.com/clarkcox3/
 _______________________________________________
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: Bryan Pietrzak <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>)
 >Re: Predefined compiler symbols (From: Bryan Pietrzak <email@hidden>)

  • Prev by Date: Re: "jump to label crosses initialization of..."
  • Next by Date: Re: Const correctness and fun
  • Previous by thread: Re: Predefined compiler symbols
  • Next by thread: Re: Predefined compiler symbols
  • Index(es):
    • Date
    • Thread