home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
- From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
- Subject: Re: Turbo C++, function prototypes
- Message-ID: <9224705.23705@mulga.cs.mu.OZ.AU>
- Sender: news@cs.mu.OZ.AU
- Organization: Computer Science, University of Melbourne, Australia
- References: <1992Aug31.181755.13060@hou.amoco.com> <2262@bigfoot.first.gmd.de> <1992Sep1.160816.10309@lclark.edu> <1992Sep2.162728.11201@taumet.com>
- Date: Wed, 2 Sep 1992 19:13:23 GMT
- Lines: 28
-
- steve@taumet.com (Steve Clamage) writes:
-
- >If you write, for example,
- > void main(){ }
- >The compiler is obligated to diagnose an error in C and C++.
-
- Are you sure? I've just tested three supposably ANSI-compliant C compilers
- and NONE of them diagnose an error (or even a warning!).
-
- The compilers were
- gcc -ansi -pedantic -Wall version 2.2.2 for mips-sgi-irix
- cc -ansi -pedantic -fullwarn "MIPS ucode C compiler" on an sgi-irix
- tcc -P- -A -w Turbo C++ 1.00 (C compiler, not C++)
-
- I also tested three C++ compilers, and got one error and one warning.
-
- g++ -ansi -pedantic -Wall version 2.2.2 for mips-sgi-irix
- Warning: return type for main changed to integer type
- CC -ansi +p +w Cfront 2.0, using the above cc
- (No diagnostic)
- tcc -P+ -A -w Turbo C++ 1.00 (C++ compiler)
- Error test.c 1: main must have a return type of int
-
- --
- Fergus Henderson fjh@munta.cs.mu.OZ.AU
- This .signature virus is a self-referential statement that is true - but
- you will only be able to consistently believe it if you copy it to your own
- .signature file!
-