aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-lang.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2001-02-12 17:31:42 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2001-02-12 17:31:42 +0000
commitf43b27955c8481056c36a99ea05f7d5523169e49 (patch)
tree1198d5daa5758bb57dfd972c4736717092539847 /gcc/c-lang.c
parentc6b33a47ea7d36d3e9eb4de227778332b179704d (diff)
downloadgcc-f43b27955c8481056c36a99ea05f7d5523169e49.zip
gcc-f43b27955c8481056c36a99ea05f7d5523169e49.tar.gz
gcc-f43b27955c8481056c36a99ea05f7d5523169e49.tar.bz2
c-decl.c (grokdeclarator): In C99 mode...
* 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. From-SVN: r39608
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 87c65fb..53ebdab 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;