prototypes not working?

David B. Anderson davea at quasar.wpd.sgi.com
Tue Aug 28 10:46:05 AEST 1990


In article <1990Aug27.233218.26580 at odin.corp.sgi.com> ted at vball.sgi.com (Ted Wilcox) writes:
>In <GLOBUS.90Aug27131635 at wk208.nas.nasa.gov> globus at 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 at sgi.com ]
[``What can go wrong?''                          --Calvin and Hobbes]



More information about the Comp.sys.sgi mailing list