delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
Message-Id: | <199905051537.KAA17044@modi.xraylith.wisc.edu> |
X-Authentication-Warning: | modi.xraylith.wisc.edu: localhost.xraylith.wisc.edu [127.0.0.1] didn't use HELO protocol |
To: | "Schaible, Joerg" <Joerg DOT Schaible AT gft DOT de> |
cc: | "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com> |
Subject: | Re: Compiler macros with version |
In-reply-to: | Your message of "Wed, 05 May 1999 16:00:07 +0200." |
<C2D7D58DBFE9D111B0480060086E96358D6F93 AT gftmail DOT gft DOT de> | |
Date: | Wed, 05 May 1999 10:37:36 -0500 |
From: | Mumit Khan <khan AT xraylith DOT wisc DOT EDU> |
"Schaible, Joerg" <Joerg DOT Schaible AT gft DOT 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 AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |