Subject: should lint define __GNUC__?
To: None <>
From: john heasley <>
List: current-users
Date: 10/21/2000 21:47:31
i'm running 1.5A2 snapshot from ~6/20, and trying to build netbsd-1-5-BETA
cvs sources from yesterday.  /usr/bin/lint (from the snapshot or 1.5B) does
not define __GNUC__; thus MKLINT=yes causes the build to bomb such as:

lint -chapbxzF -d /u5/release-1.5B/usr/include -I/u5/1.5B/src/gnu/lib/libgcc/../../usr.bin/egcs/arch/sparc -I/u5/1.5B/src/gnu/lib/libgcc/../../usr.bin/egcs/arch -I/u5/1.5B/src/gnu/lib/libgcc/../../dist/gcc/config -I/u5/1.5B/src/gnu/lib/libgcc/../../dist/gcc/cp -I/u5/1.5B/src/gnu/lib/libgcc/../../dist/gcc -i /u5/1.5B/src/gnu/lib/libgcc/../../dist/gcc/frame.c
In file included from /u5/1.5B/src/gnu/lib/libgcc/../../dist/gcc/config/sparc/xm-netbsd.h:3,
                 from /u5/1.5B/src/gnu/lib/libgcc/../../usr.bin/egcs/arch/sparc/tconfig.h:3,
                 from /u5/1.5B/src/gnu/lib/libgcc/../../dist/gcc/frame.c:34:
/u5/1.5B/src/gnu/lib/libgcc/../../dist/gcc/config/sparc/xm-sparc.h:48: alloca.h: No such file or directory
In file included from /u5/1.5B/src/gnu/lib/libgcc/../../dist/gcc/frame.c:49:
/u5/1.5B/src/gnu/lib/libgcc/../../dist/gcc/gansidecl.h:50: warning: `__attribute__' redefined
/u5/release-1.5B/usr/include/sys/cdefs.h:157: warning: this is the location of the previous definition
*** Error code 1

xm-sparc.h:    46  /* If compiled with Sun CC, the use of alloca requires this #include.  */
xm-sparc.h:    47  #ifndef __GNUC__
xm-sparc.h:    48  #include "alloca.h"
xm-sparc.h:    49  #endif

cc defines __GNUC__.  why wouldnt/shouldnt lint?

maple [70] /usr/bin/cc -E -
#ifdef __GNUC__   
# 1 ""


is MKLINT=yes not normal practice?