Subject: Re: lib/36511: lcc is an ANSI C compiler for a variety of platforms
To: None <gnats-bugs@NetBSD.org>
From: Aleksey Cheusov <cheusov@tut.by>
List: netbsd-bugs
Date: 06/19/2007 23:46:09
>  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.