Subject: Re: gcc3's cpp not defining __GNUC__
To: Jaromir Dolecek <jdolecek@NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: tech-pkg
Date: 07/21/2003 16:20:17
On Mon, Jul 21, 2003 at 04:05:29PM +0200, Thomas Klausner wrote:
> Perhaps checking for __GCC__ is as useful as checking
> for __unix__ :)

No. Besides, we are talking about __GNUC__. There are lots of GCC-isms and
it is only valid to rely on some of them (i.e. the gcc version test) if you
know you are compiling with gcc. You can write code with safe assumptions
if you test for gcc and the proper version before (see for example how we
define the __restrict macro in /usr/include/sys/cdefs.h).

Martin