This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Implicit built-in function declarations
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 1 Aug 2004 22:26:17 +0000 (UTC)
- Subject: Implicit built-in function declarations
Part of a patch I'm testing for bug 13801 leads to mandatory warnings for
implicit declarations of built-in functions (other than those in the
implementation namespace ^_[_A-Z]) if the type of the implicit declaration
is not compatible with the type of the built-in function. Are there any
comments on this (that the warnings shouldn't be on by default, that they
should be mandatory errors, ...)?
Note that all implicit declarations of built-in functions (not just those
with incompatible types) have had warnings for some time at -Wall and by
default in C99 mode.
The most common instances in gcc.dg are for implicit declarations of abort
and exit, but other functions involved (outside the tests for built-in
functions) include printf, memcpy, strlen, memset, fabs and alloca; any
built-in function with a return type that is not int, or which is
variadic, or which has an argument changed by the default argument
promotions, will receive the warning if implicitly declared.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)