Message-ID: <30C9E24891FFD411B68A009027724CB702C04E42@eg-002-015.eglin.af.mil> From: Keen Wayne A Contr AFRL/MNGG To: "'djgpp AT delorie DOT com'" Subject: gcc 3.2.1 Version Date: Wed, 4 Dec 2002 08:38:47 -0600 X-Mailer: Internet Mail Service (5.5.2653.19) Reply-To: djgpp AT delorie DOT com You got my curiosity up, so I checked the same operation on Cygwin. I got a similar result, PATCHLEVEL appears not to be defined. On the other hand, I was able to use __VERSION__ to get the right result. I took the liberty of tacking onto your code. As a side note, WHY can I never remember %s is the format string for string. What a moron I am. #include #include using namespace std; int main (void) { char buf[30], *p = buf; p += sprintf (p, "gcc %d.%d %s", __GNUC__, __GNUC_MINOR__,__VERSION__); #if defined(__GNUC_PATCHLEVEL) p += sprintf (p, ".%d", __GNUC_PATCHLEVEL); cout << "Yes, I am defined\n"; #endif puts (buf); return (0); } Wayne