Commit 46ca739c by Joseph Myers Committed by Jeff Law

c-decl.c (store_parm_decls): In C99 mode...

        * 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
parent 1b398090
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
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment