On Sun, Feb 06, 2005 at 09:52:50PM -0500, Ian Lance Taylor wrote: > > Can anyone point me to where C99 explicitly disallows a function > > without a declaration > C99 disallows a function without a declaration in 6.5.2.2 paragraph 1: > "The expression that denotes the called function shall have type > pointer to function returning void or returning an object type other > than an array type." This does not permit an undeclared symbol. Thanks, that clears it up for me. > As you note, gcc in c99 mode will always give a warning for an > undeclared function; this is not true in c89 mode. In c99 mode, the > compiler will give an error if you use the -pedantic-errors option. > Or the -Werror-implicit-function-declaration option. Or the -Werror > option. So do you know why if it is against the standard, gcc in with --std=c99 requires it be explicitly turned into an error? Is it just a backwards/cross compatibility thing? -i ianw@xxxxxxxxxxxxxxxxxx http://www.gelato.unsw.edu.au
Attachment:
signature.asc
Description: Digital signature