This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: C99 implies -Wimplicit-function-declaration?
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Gary Funck <gary at intrepid dot com>
- Cc: Gcc Mailing List <gcc at gcc dot gnu dot org>
- Date: Sat, 21 May 2005 12:02:40 +0000 (UTC)
- Subject: RE: C99 implies -Wimplicit-function-declaration?
- References: <JCEPIPKHCJGDMPOHDOIGIEJLCOAA.gary@intrepid.com>
On Fri, 20 May 2005, Gary Funck wrote:
> OK, thanks. I (now) understand that the reference to a warning about a missing protoype
> does not apply. However, I don't see anything in section 6.5.2.2
> (rev. 1999-12-01) that says that a function declaration or prototype
> declaration must (or should) precede a call to the function. And GCC isn't treating it
That's because it's 6.5.1 paragraph 2: only declared identifiers are valid
in expressions.
> as an error, but rather is enabling the warning by default.
Because C90 permitted this, we guess what you meant. However, by choosing
C99 mode you're giving a strong indication that you should not be using
any feature removed in C99, so we warn, or give an error with
-pedantic-errors.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)