This is the mail archive of the cygwin@sourceware.cygnus.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
Re: Compiler macros with version
- To: "Schaible, Joerg" <Joerg.Schaible@gft.de>
- Subject: Re: Compiler macros with version
- From: Mumit Khan <khan@xraylith.wisc.EDU>
- Date: Wed, 05 May 1999 10:37:36 -0500
- cc: "'cygwin@sourceware.cygnus.com'" <cygwin@sourceware.cygnus.com>
"Schaible, Joerg" <Joerg.Schaible@gft.de> writes:
> Hello out there!
>
> Are there any predefined macros containing the version of the compiler =
> e.g.
> like _MSC_VER =3D 0x1200 for the MSVC6?
>
> I am using the cygwin B20 suite and the EGCS 1.1.2 / Mingw32 port from =
> Mumit
> Khan.
>
> I suppose it may be __GNUC__ or __CYGWIN__, but which value do they =
> have and
> are there others (identifying egcs)?
>
Here's how you can find all the predefined macros:
$ echo "" > dummy.c
$ gcc -E -dM dummy.c
You'll see the following in the output:
__GNUC__ -- all gnu Compiler versions (egcs = 2)
__GNUC_MINOR__ -- all gnu Compiler versions (egcs = 91)
__CYGWIN__ -- CYGWIN
__CYGWIN32__ -- old Cygwin (pre b20, now deprecated)
__GNUC_MINOR__ >= 90 implies EGCS as opposed to FSF GCC-2.x.x. When EGCS
becomes GCC 3, then __GNUC__ will become 3 and __GNUC_MINOR__ will reset.
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com