]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/45062 (Revision 162223 caused ICE at c-decl.c:4064)
authorNathan Froyd <froydnj@codesourcery.com>
Thu, 2 Dec 2010 18:00:21 +0000 (18:00 +0000)
committerNathan Froyd <froydnj@gcc.gnu.org>
Thu, 2 Dec 2010 18:00:21 +0000 (18:00 +0000)
PR c/45062
* c-decl.c (grokparms): Set arg_info->parms to NULL_TREE when
!funcdef_flag.

From-SVN: r167381

gcc/ChangeLog
gcc/c-decl.c

index c72c6934f411a12b1b44f3ab88b4f0fe876cad2c..a29b13ae71cd6794327bfa1718cb378f0e796914 100644 (file)
@@ -1,3 +1,9 @@
+2010-12-02  Nathan Froyd  <froydnj@codesourcery.com>
+
+       PR c/45062
+       * c-decl.c (grokparms): Set arg_info->parms to NULL_TREE when
+       !funcdef_flag.
+
 2010-12-02  Sebastian Pop  <sebastian.pop@amd.com>
 
        PR tree-optimization/45199
index b1055b039e9668ea98b5e535c14a2c90facbf8f3..ac8f020750e69369f0ad57693c06d619ebf2ef13 100644 (file)
@@ -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;
     }