aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2000-07-27 09:49:56 -0600
committerJeff Law <law@gcc.gnu.org>2000-07-27 09:49:56 -0600
commit46ca739cb5c08ef9d1ad595b3bb4a95e7043aefa (patch)
tree8f030d2f6abc1813f67b17d797d3b43298721f9c /gcc/c-decl.c
parent1b3980905d2ab55a6a858020abb055412b8040f2 (diff)
downloadgcc-46ca739cb5c08ef9d1ad595b3bb4a95e7043aefa.zip
gcc-46ca739cb5c08ef9d1ad595b3bb4a95e7043aefa.tar.gz
gcc-46ca739cb5c08ef9d1ad595b3bb4a95e7043aefa.tar.bz2
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
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index d80e3d4..0b8621f 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -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);
}