This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Error on implicit function definition?
- To: egcs at cygnus dot com
- Subject: Error on implicit function definition?
- From: Robert Krawitz <rlk at torrent dot com>
- Date: Tue, 27 Oct 1998 11:49:26 +0500
- Cc: randy at torrent dot com
Is there an option to take an error (rather than merely warn) on
implicit function definition? The fact that g++ and egcs merely warn
without taking an error causes us considerable annoyance, since it
means that g++ accepts code that other compilers don't.
a()
{
foo();
}
g++ -Wall -c implicit.c -ansi -pedantic-errors
implicit.c: In function `int a()':
implicit.c:2: return-type defaults to `int'
implicit.c:3: implicit declaration of function `int foo(...)'
implicit.c:4: warning: control reaches end of non-void function `a()'
--
Robert Krawitz <rlk@torrent.com> Founding Engineer
Torrent Systems Inc. 617-354-8484x104