]> gcc.gnu.org Git - gcc.git/commitdiff
c-decl.c (store_parm_decls): In C99 mode...
authorJoseph Myers <jsm28@cam.ac.uk>
Thu, 27 Jul 2000 15:49:56 +0000 (09:49 -0600)
committerJeff Law <law@gcc.gnu.org>
Thu, 27 Jul 2000 15:49:56 +0000 (09:49 -0600)
        * c-decl.c (store_parm_decls): In C99 mode, pedwarn for function
        parameters defaulting to int in an old-style function definition.

From-SVN: r35292

gcc/ChangeLog
gcc/c-decl.c

index 36f246c7b1b9e4c9b2c0870262dcb0f93259487a..c413b49a3253af9efa935dbc2307c87fe52a3564 100644 (file)
@@ -1,3 +1,8 @@
+2000-07-27  Joseph S. Myers  <jsm28@cam.ac.uk>
+
+       * c-decl.c (store_parm_decls): In C99 mode, pedwarn for function
+       parameters defaulting to int in an old-style function definition.
+
 2000-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * c-parse.in (string): For -Wtraditional, warn about string
index d80e3d4a5da9b379ba36f097287785f38391b84d..0b8621f750f3033bf18c964ebbe5af3ae60bc760 100644 (file)
@@ -6190,7 +6190,9 @@ store_parm_decls ()
              DECL_ARG_TYPE (found) = TREE_TYPE (found);
              DECL_SOURCE_LINE (found) = DECL_SOURCE_LINE (fndecl);
              DECL_SOURCE_FILE (found) = DECL_SOURCE_FILE (fndecl);
-             if (extra_warnings)
+             if (flag_isoc99)
+               pedwarn_with_decl (found, "type of `%s' defaults to `int'");
+             else if (extra_warnings)
                warning_with_decl (found, "type of `%s' defaults to `int'");
              pushdecl (found);
            }
This page took 0.094936 seconds and 5 git commands to generate.