diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-07-31 18:10:31 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-07-31 18:10:31 +0000 |
commit | 111458f1bf05cbfe487bdab956917a59c5fdc60d (patch) | |
tree | 71356bf58f3c89b7f453bb3fe8fa75cffb958203 /gcc/c-lang.c | |
parent | cdbca1727ce8d428964efcb2f20ee82142a2c762 (diff) | |
download | gcc-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-lang.c')
-rw-r--r-- | gcc/c-lang.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/c-lang.c b/gcc/c-lang.c index 620ed78..a34f306 100644 --- a/gcc/c-lang.c +++ b/gcc/c-lang.c @@ -69,6 +69,15 @@ lang_init () if (flag_bounds_check < 0) flag_bounds_check = flag_bounded_pointers; + /* If still unspecified, make it match pedantic && -std=c99. */ + if (mesg_implicit_function_declaration < 0) + { + if (pedantic && flag_isoc99) + mesg_implicit_function_declaration = flag_pedantic_errors ? 2 : 1; + else + mesg_implicit_function_declaration = 0; + } + /* the beginning of the file is a new line; check for # */ /* With luck, we discover the real source file's name from that and put it in input_filename. */ |