re PR java/16675 (Null parameter values for anonymous constructor invocation require...
authorTom Tromey <tromey@redhat.com>
Thu, 2 Dec 2004 19:41:03 +0000 (19:41 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 2 Dec 2004 19:41:03 +0000 (19:41 +0000)
PR java/16675:
* parse.y (craft_constructor): Special case null_pointer_node.

From-SVN: r91657

gcc/java/ChangeLog
gcc/java/parse.y

index 88117f5edc459d5860fda6691dea47aec0ccfe89..4f4b8bd1aa691a67450360dff7db7c2ff2a35d4d 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-02  Tom Tromey  <tromey@redhat.com>
+
+       PR java/16675:
+       * parse.y (craft_constructor): Special case null_pointer_node.
+
 2004-12-02  Tom Tromey  <tromey@redhat.com>
 
        PR java/18741:
index 2b3d3a4a795db23191d4b457bd4821350db2a0b9..2634de98f4f82980fa374cb53451bc5d27205045 100644 (file)
@@ -5591,6 +5591,10 @@ craft_constructor (tree class_decl, tree args)
   /* Then if there are any args to be enforced, enforce them now */
   for (; args && args != end_params_node; args = TREE_CHAIN (args))
     {
+      /* If we see a `void *', we need to change it to Object.  */
+      if (TREE_VALUE (args) == TREE_TYPE (null_pointer_node))
+       TREE_VALUE (args) = object_ptr_type_node;
+
       sprintf (buffer, "parm%d", i++);
       parm = tree_cons (get_identifier (buffer), TREE_VALUE (args), parm);
     }