From owner-freebsd-hackers Fri Jul 5 19:18:42 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id TAA29524 for hackers-outgoing; Fri, 5 Jul 1996 19:18:42 -0700 (PDT) Received: from parkplace.cet.co.jp (parkplace.cet.co.jp [202.32.64.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id TAA29518 for ; Fri, 5 Jul 1996 19:18:36 -0700 (PDT) Received: from localhost (michaelh@localhost) by parkplace.cet.co.jp (8.7.5/CET-v2.1) with SMTP id CAA28969; Sat, 6 Jul 1996 02:18:25 GMT Date: Sat, 6 Jul 1996 11:18:25 +0900 (JST) From: Michael Hancock To: Greg Lehey cc: FreeBSD Hackers Subject: Re: gcc lies? In-Reply-To: <199607051011.MAA15302@allegro.lemis.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk This is probably why BSDI uses gcc 1.x for the kernel and gives their screaming customers 2.7.2. -mike hancock On Fri, 5 Jul 1996, Greg Lehey wrote: > 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 > -- michaelh@cet.co.jp http://www.cet.co.jp CET Inc., Daiichi Kasuya BLDG 8F 2-5-12, Higashi Shinbashi, Minato-ku, Tokyo 105 Japan Tel: +81-3-3437-1761 Fax: +81-3-3437-1766