Received: (at submit) by bugs.debian.org; 27 Sep 1996 17:43:33 +0000 Received: (qmail 16773 invoked from smtpd); 27 Sep 1996 17:43:30 -0000 Received: from gobbel.extern.ucsd.edu (HELO gigan.ucsd.edu) (root@137.110.78.121) by master.debian.org with SMTP; 27 Sep 1996 17:43:29 -0000 Received: from gigan (gobbel@localhost [127.0.0.1]) by gigan.ucsd.edu (8.7.5/8.7.3) with SMTP id KAA10645; Fri, 27 Sep 1996 10:36:01 -0700 Sender: gobbel@cogsci.ucsd.edu Message-ID: <324C1081.6D422136@cogsci.ucsd.edu> Date: Fri, 27 Sep 1996 10:36:01 -0700 From: Randy Gobbel <gobbel@cogsci.ucsd.edu> Organization: UCSD Cognitive Science Dept. X-Mailer: Mozilla 3.0 (X11; I; Linux 2.0.21 i686) MIME-Version: 1.0 To: submit@bugs.debian.org Subject: gcc tries to compile #ifndef'ed-out code Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Package: gcc Version: 2.7.2.1-1 I was trying to track down a bug in csh (5.26-2), and so compiled with -DSYSMALLOC. Most of alloc.c is inside of an #ifndef SYSMALLOC conditional, but gcc complained about a bunch of stuff in alloc.c anyway: -------------------------------- cd /usr/src/csh-5.26/ make gcc -O3 -I/usr/include/bsd -include /usr/include/bsd/bsd.h -DFILEC -DNLS -DSHORT_STRINGS -I. -DSYSMALLOC -c csh.c -o csh.o gcc -O3 -I/usr/include/bsd -include /usr/include/bsd/bsd.h -DFILEC -DNLS -DSHORT_STRINGS -I. -DSYSMALLOC -c alloc.c -o alloc.o alloc.c:447: conflicting types for `malloc' extern.h:318: previous declaration of `malloc' alloc.c:462: conflicting types for `realloc' extern.h:319: previous declaration of `realloc' alloc.c:477: conflicting types for `calloc' extern.h:320: previous declaration of `calloc' make: *** [alloc.o] Error 1 Compilation exited abnormally with code 2 at Fri Sep 27 10:33:06 ---------------------------------- The lines referred to in the error messages are well inside the #ifndef. Putting an #if 0 around the #ifndef'ed section made the complaints disappear. -Randy -- http://cogsci.ucsd.edu/~gobbel/