[comp.sys.sgi] prototypes not working?

globus@nas.nasa.gov (Al Globus) (08/28/90)

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. 

ted@vball.sgi.com (Ted Wilcox) (08/28/90)

In <GLOBUS.90Aug27131635@wk208.nas.nasa.gov> 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.
                   | In the Olympic Games, Greeks ran races, jumped,
Ted.               | hurled the biscuits, and threw the java.
ted@sgi.com        |    -Some history student.

davea@quasar.wpd.sgi.com (David B. Anderson) (08/28/90)

In article <1990Aug27.233218.26580@odin.corp.sgi.com> ted@vball.sgi.com (Ted Wilcox) writes:
>In <GLOBUS.90Aug27131635@wk208.nas.nasa.gov> 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]

ted@vball.sgi.com (Ted Wilcox) (08/29/90)

In <67855@sgi.sgi.com> davea@quasar.wpd.sgi.com (David B. Anderson) writes:
>In article <1990Aug27.233218.26580@odin.corp.sgi.com> ted@vball.sgi.com (Ted Wilcox) writes:
>>In <GLOBUS.90Aug27131635@wk208.nas.nasa.gov> globus@nas.nasa.gov (Al Globus) writes:

>>>I'm using prototypes in my code but not getting any error messages
>>"-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.

Ummmmmmmmmm.  Wellllllllll.  Heh heh.
I think I'll go pry my toes out of my throat now.
                   | In the Olympic Games, Greeks ran races, jumped,
Ted.               | hurled the biscuits, and threw the java.
ted@sgi.com        |    -Anonymous history student.