From aa3ef09bf596e90140e21d3e2c53f461e643ba7e Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Thu, 2 Dec 2010 18:00:21 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/c-decl.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c72c6934f411..a29b13ae71cd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-12-02 Nathan Froyd + + PR c/45062 + * c-decl.c (grokparms): Set arg_info->parms to NULL_TREE when + !funcdef_flag. + 2010-12-02 Sebastian Pop PR tree-optimization/45199 diff --git a/gcc/c-decl.c b/gcc/c-decl.c index b1055b039e96..ac8f020750e6 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; }