home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.programming
- Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zrz.tu-berlin.de!mailgzrz.tu-berlin.de!nickel
- From: nickel@cs.tu-berlin.de (Juergen Nickelsen)
- Subject: ANSI C, was Re: Teaching the basics
- In-Reply-To: mhcoffin@tolstoy.uwaterloo.ca's message of Thu, 20 Aug 1992 21:25:07 GMT
- Message-ID: <NICKEL.92Aug21010722@desaster.cs.tu-berlin.de>
- Lines: 22
- Sender: news@mailgzrz.tu-berlin.de (News Manager)
- Nntp-Posting-Host: desaster.cs.tu-berlin.de
- Reply-To: nickel@cs.tu-berlin.de
- Organization: STONE Project, Technical University of Berlin, Germany
- References: <Bt6DGq.HuB@metropolis.com> <12635@anderson>
- <ratner.714247759@ficus.cs.ucla.edu> <13226@bnr-rsc.UUCP>
- <MHCOFFIN.92Aug20162507@tolstoy.uwaterloo.ca>
- Date: Thu, 20 Aug 1992 23:07:25 GMT
-
- In article <MHCOFFIN.92Aug20162507@tolstoy.uwaterloo.ca>
- mhcoffin@tolstoy.uwaterloo.ca (Michael Coffin) writes:
-
- > It is true that if you use a certain amount of discipline and make
- > sure that the same prototype appears in both places---by putting it in
- > an include file---the compiler will detect the error. The problem is,
- > there isn't any enforcement of this policy.
-
- This is indeed a weakness of the standard, but at least gcc can be
- told to issue a warning when a function call without a previous
- prototype is encountered. From the manual:
-
- `-Wmissing-prototypes'
- Warn if a global function is defined without a previous prototype
- declaration. This warning is issued even if the definition itself
- provides a prototype. The aim is to detect global functions that
- fail to be declared in header files.
-
- But using this is a major pain on a system without ANSI Header files.
-
- --
- Juergen Nickelsen
-