aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-12-02 18:00:21 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-12-02 18:00:21 +0000
commitaa3ef09bf596e90140e21d3e2c53f461e643ba7e (patch)
tree2cd63fc99b0d0fe60be806e4861799deacca7363 /gcc/c-decl.c
parent5e37ea0ef1bb8d9a27e6502a82b7b14f30d6d6b6 (diff)
downloadgcc-aa3ef09bf596e90140e21d3e2c53f461e643ba7e.zip
gcc-aa3ef09bf596e90140e21d3e2c53f461e643ba7e.tar.gz
gcc-aa3ef09bf596e90140e21d3e2c53f461e643ba7e.tar.bz2
re PR c/45062 (Revision 162223 caused ICE at c-decl.c:4064)
PR c/45062 * c-decl.c (grokparms): Set arg_info->parms to NULL_TREE when !funcdef_flag. From-SVN: r167381
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index b1055b0..ac8f020 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -6131,9 +6131,13 @@ grokparms (struct c_arg_info *arg_info, bool funcdef_flag)
else if (arg_types && TREE_CODE (TREE_VALUE (arg_types)) == IDENTIFIER_NODE)
{
if (!funcdef_flag)
- pedwarn (input_location, 0, "parameter names (without types) in function declaration");
+ {
+ pedwarn (input_location, 0, "parameter names (without types) in function declaration");
+ arg_info->parms = NULL_TREE;
+ }
+ else
+ arg_info->parms = arg_info->types;
- arg_info->parms = arg_info->types;
arg_info->types = 0;
return 0;
}