aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-typeck.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-07-31 18:10:31 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-07-31 18:10:31 +0000
commit111458f1bf05cbfe487bdab956917a59c5fdc60d (patch)
tree71356bf58f3c89b7f453bb3fe8fa75cffb958203 /gcc/c-typeck.c
parentcdbca1727ce8d428964efcb2f20ee82142a2c762 (diff)
downloadgcc-111458f1bf05cbfe487bdab956917a59c5fdc60d.zip
gcc-111458f1bf05cbfe487bdab956917a59c5fdc60d.tar.gz
gcc-111458f1bf05cbfe487bdab956917a59c5fdc60d.tar.bz2
c-decl.c (mesg_implicit_function_declaration): Init to -1.
* c-decl.c (mesg_implicit_function_declaration): Init to -1. (implicit_decl_warning): New function. (implicitly_declare): Use it. * c-typeck.c (build_external_ref): Use implicit_decl_warning to complain about implicit decls of builtins. * c-lang.c (lang_init): Set mesg_implicit_function_declaration based on pedantic && flag_isoc99, if not already set. * c-tree.h: Declare mesg_implicit_function_declaration. Prototype implicit_decl_warning. * gcc.dg/c99-impl-decl-1.c: No longer XFAIL. From-SVN: r35385
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r--gcc/c-typeck.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 17cdedd..e6fc249 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -1417,9 +1417,10 @@ build_external_ref (id, fun)
/* Implicit declaration of built-in function. Don't
change the built-in declaration, but don't let this
go by silently, either. */
- pedwarn ("implicit declaration of function `%s'",
- IDENTIFIER_POINTER (DECL_NAME (decl)));
- C_DECL_ANTICIPATED (decl) = 0; /* only issue this warning once */
+ implicit_decl_warning (id);
+
+ /* only issue this warning once */
+ C_DECL_ANTICIPATED (decl) = 0;
ref = decl;
}
}