Date: Fri, 9 May 1997 19:02:49 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: jin@george.lbl.gov (Jin Guojun[ITG]) Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: gnu/3554 Message-ID: <19970509190249.LK60340@uriah.heep.sax.de> In-Reply-To: <199705091611.JAA28108@george.lbl.gov>; from Jin Guojun[ITG] on May 9, 1997 09:11:41 -0700 References: <199705091611.JAA28108@george.lbl.gov>
next in thread | previous in thread | raw e-mail | index | archive | help
As Jin Guojun[ITG] wrote: > Theoretically, it is correct; but it is awkward. This kind program bug is > very hard to find out without checking every word of the code. cc does NOT > provide any information/warrning on it, ... It does. You need to enable warnings if you want them: j@uriah 90% cat > foo.c int main(void) { int i; switch (i) { case 0: return 0; case 1: return 23; deafult: return -1; } return 0; } ^D j@uriah 91% cc -c -Wall foo.c foo.c: In function `main': foo.c:13: warning: label `deafult' defined but not used > The cc could be a little smart to do this: Well, but you gotta discuss design decisions of gcc with the gcc folks. We can't/won't do anything but using their contributed code. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970509190249.LK60340>