This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: C99 implies -Wimplicit-function-declaration?


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]