Compiler macros with version
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 =
> like _MSC_VER =3D 0x1200 for the MSVC6?
> I am using the cygwin B20 suite and the EGCS 1.1.2 / Mingw32 port from =
> 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.
Want to unsubscribe from this list?
Send a message to email@example.com
More information about the Cygwin