Subject: Re: lib/36511: lcc is an ANSI C compiler for a variety of platforms
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Aleksey Cheusov <cheusov@tut.by>
List: netbsd-bugs
Date: 06/19/2007 20:50:05
The following reply was made to PR lib/36511; it has been noted by GNATS.
From: Aleksey Cheusov <cheusov@tut.by>
To: gnats-bugs@NetBSD.org
Cc: lib-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: lib/36511: lcc is an ANSI C compiler for a variety of platforms
Date: Tue, 19 Jun 2007 23:46:09 +0300
> this should be valid for an ANSI C compiler. the relevant parts are:
>
> from <sys/cdefs.h>:
>
> #ifdef __GNUC__
^^^^^^^^
__STDC__ here
> #define __GNUC_PREREQ__(x, y) \
> ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
> (__GNUC__ > (x)))
> #else
> #define __GNUC_PREREQ__(x, y) 0
> #endif
>
>
> and the usage from <sys/cdefs_elf.h>:
>
> #if __GNUC_PREREQ__(4, 0)
>
>
> so this should come out as "#if 0" for non GCC compilers. does lcc
> define __GNUC__ by chance?
No it doesn't not. It defines its own __LCC__
--
Best regards, Aleksey Cheusov.