OSDN Git Service

PR java/16675:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Dec 2004 19:41:03 +0000 (19:41 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Dec 2004 19:41:03 +0000 (19:41 +0000)
* parse.y (craft_constructor): Special case null_pointer_node.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91657 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 88117f5..4f4b8bd 100644 (file)
@@ -1,5 +1,10 @@
 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:
        * java-gimplify.c (java_gimplify_expr): Don't call
        SET_EXPR_LOCATION unless wrapped tree is an expression.
index 2b3d3a4..2634de9 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);
     }