(store_parm_decls): Change type of void parameter to error_mark_node.
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 23 Jun 1992 23:15:52 +0000 (16:15 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 23 Jun 1992 23:15:52 +0000 (16:15 -0700)
From-SVN: r1246

gcc/c-decl.c

index 57744cd924b2bc52e42bf9b7692b882799c6c0be..2c5687ca76bc257209ba657ea978a8d79704198c 100644 (file)
@@ -5183,7 +5183,12 @@ store_parm_decls ()
              if (DECL_NAME (parm) == 0)
                error_with_decl (parm, "parameter name omitted");
              else if (TREE_TYPE (parm) == void_type_node)
-               error_with_decl (parm, "parameter `%s' declared void");
+               {
+                 error_with_decl (parm, "parameter `%s' declared void");
+                 /* Change the type to error_mark_node so this parameter
+                    will be ignored by assign_parms.  */
+                 TREE_TYPE (parm) = error_mark_node;
+               }
              pushdecl (parm);
            }
          else