Date: Fri, 5 Jul 1996 12:11:51 +0200 (MET DST) From: grog@lemis.de (Greg Lehey) To: hackers@freebsd.org (FreeBSD Hackers) Subject: gcc lies? Message-ID: <199607051011.MAA15302@allegro.lemis.de>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607051011.MAA15302>