Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!sgi!davea@quasar.wpd.sgi.com From: davea@quasar.wpd.sgi.com (David B. Anderson) Newsgroups: comp.sys.sgi Subject: Re: prototypes not working? Message-ID: <67855@sgi.sgi.com> Date: 28 Aug 90 00:46:05 GMT References: <1990Aug27.233218.26580@odin.corp.sgi.com> Sender: guest@sgi.sgi.com Reply-To: davea@quasar.UUCP (David B. Anderson) Distribution: comp.sys.sgi Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 38 In article <1990Aug27.233218.26580@odin.corp.sgi.com> ted@vball.sgi.com (Ted Wilcox) writes: >In globus@nas.nasa.gov (Al Globus) writes: > >>I'm using prototypes in my code but not getting any error messages >>from the C compiler. Anyone have an idea of what I'm doing wrong? >>In the test cases I've used, the functions have been 'static'. >>Thanx. > >In the "cc" man page, it says that prototype error and warning messages >are suppressed, but that you can turn them on by specifying the >"-prototypes" option. It also says that "use of this option is not >recommended." I'm not sure why it's not recommended. Ted is normally very careful. Unfortunately he misread the cc man page. Perhaps my wording there lead to confusion. Use of -prototypes (this option is new in release 3.3) is strongly recommended! Note that certain error messages suppressed by the default -noprototypes relate to serious errors that can cause ugen to coredump. This is my fault and happens because it is a little hard for ccom to reliably distinguish ``harmless'' errors from disastrous ones. Too many cases. Sorry. No existing working 3.2 code will coredump ugen if you recompile under 3.3! I claim :-) The problem only exists with new code. The best practice is to use -prototypes and fix all errors. If there are warnings remaining you may choose to use -noprototypes to eliminate the warnings - but I'd suggest simply fixing the problems..... -noprototypes was made the default so existing 3.2 code would compile without complaint under 3.3. See the 3.3 release notes for further information about the changes and new features of release 3.3 cc. Hope this helps. [ David B. Anderson Silicon Graphics (415)335-1548 davea@sgi.com ] [``What can go wrong?'' --Calvin and Hobbes]