From owner-freebsd-hackers Fri Jul 5 17:27:11 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA21959 for hackers-outgoing; Fri, 5 Jul 1996 17:27:11 -0700 (PDT) Received: from diablo.ppp.de (diablo.ppp.de [193.141.101.34]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id RAA21945 for ; Fri, 5 Jul 1996 17:27:05 -0700 (PDT) Received: from allegro.lemis.de by diablo.ppp.de with smtp (Smail3.1.28.1 #1) id m0uc88q-000QcuC; Fri, 5 Jul 96 12:29 MET DST From: grog@lemis.de (Greg Lehey) Organisation: LEMIS, Schellnhausen 2, 36325 Feldatal, Germany Phone: +49-6637-919123 Fax: +49-6637-919122 Received: (grog@localhost) by allegro.lemis.de (8.6.9/8.6.9) id MAA15302 for hackers@freebsd.org; Fri, 5 Jul 1996 12:11:51 +0200 Message-Id: <199607051011.MAA15302@allegro.lemis.de> Subject: gcc lies? To: hackers@freebsd.org (FreeBSD Hackers) Date: Fri, 5 Jul 1996 12:11:51 +0200 (MET DST) X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I ran into a bug in gcc yesterday: certain initializers caused it to SIGSEGV. Before sending in a bug report, I tried it with the BSD/OS cc, and it worked fine. So I ported 2.7.2, and that worked fine as well, so I decided not to file a bug report (though I do intend to try it with the released version of 2.7.2). So I installed 2.7.2 as my standard compiler, and hey! suddenly I get thousands of warnings from my kernel builds. For example, gcc -c -O -W -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Winline -Wunused -g -nostdinc -I. -I../.. -I../../sys -I../../../include -DI486_CPU -DI586_CPU -DHARDFONTS -DSCSIDEBUG -DIPACCT -DCOMPAT_43 -DCD9660 -DMSDOSFS -DNFS -DFFS -DINET -DKERNEL ../../kern/kern_descrip.c ../../kern/kern_descrip.c: In function `getdtablesize': ../../kern/kern_descrip.c:99: warning: unused parameter `uap' ../../kern/kern_descrip.c: In function `dup2': ../../kern/kern_descrip.c:127: warning: comparison between signed and unsigned ../../kern/kern_descrip.c:130: warning: comparison between signed and unsigned ../../kern/kern_descrip.c:136: warning: comparison between signed and unsigned ../../kern/kern_descrip.c:139: warning: comparison between signed and unsigned ../../kern/kern_descrip.c: In function `dup': ../../kern/kern_descrip.c:181: warning: comparison between signed and unsigned ../../kern/kern_descrip.c: In function `fcntl': ../../kern/kern_descrip.c:213: warning: comparison between signed and unsigned ../../kern/kern_descrip.c:222: warning: comparison between signed and unsigned ../../kern/kern_descrip.c: In function `close': (that's not all, but it's enough). If I compile the same module with the standard release gcc, I get no warnings at all. How come? At first I thought it might be the header files, but there's a -nostdinc in there, and I checked: it really does include just the kernel header files. Greg