Compiler macros with version
Mumit Khan
khan@xraylith.wisc.EDU
Mon May 31 21:10:00 GMT 1999
"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
More information about the Cygwin
mailing list