aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-lang.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-12 17:31:42 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-12 17:31:42 +0000
commit508469fee36069e92dc4b01adf6f0db001a71612 (patch)
tree1198d5daa5758bb57dfd972c4736717092539847 /gcc/c-lang.c
parenta6a4df66b06d5563c22185dd1065dc3b1355827c (diff)
* c-decl.c (grokdeclarator): In C99 mode, give the more specific
"return type defaults" warning for functions with return type defaulting to int. * c-lang.c (c_init): In C99 mode, enable warnings for implicit function declarations by default rather than only when pedantic. testsuite: * gcc.dg/c99-impl-int-1.c: Use stricter error string for implicit return type. * gcc.dg/cpp/digraphs.c: Declare puts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39608 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lang.c')
-rw-r--r--gcc/c-lang.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c-lang.c b/gcc/c-lang.c
index 87c65fbacae..53ebdabb546 100644
--- a/gcc/c-lang.c
+++ b/gcc/c-lang.c
@@ -70,10 +70,11 @@ c_init ()
{
c_common_lang_init ();
- /* If still unspecified, make it match pedantic && -std=c99. */
+ /* If still unspecified, make it match -std=c99
+ (allowing for -pedantic-errors). */
if (mesg_implicit_function_declaration < 0)
{
- if (pedantic && flag_isoc99)
+ if (flag_isoc99)
mesg_implicit_function_declaration = flag_pedantic_errors ? 2 : 1;
else
mesg_implicit_function_declaration = 0;