aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/class.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2005-08-08 14:56:18 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2005-08-08 14:56:18 +0000
commit063fb392d218bfecd0d60dc790a94cf7208b92aa (patch)
tree286bf4d6e59159e3c998a456c121a115c046e034 /gcc/java/class.c
parentf303a996311673f8c9178f6593bf4c804077a8ec (diff)
downloadgcc-063fb392d218bfecd0d60dc790a94cf7208b92aa.zip
gcc-063fb392d218bfecd0d60dc790a94cf7208b92aa.tar.gz
gcc-063fb392d218bfecd0d60dc790a94cf7208b92aa.tar.bz2
class.c (build_class_ref): Wrap the primary class type in a NOP_EXPR.
* class.c (build_class_ref): Wrap the primary class type in a NOP_EXPR. * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the primary class type from the NOP_EXPR in which it was placed. From-SVN: r102859
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r--gcc/java/class.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c
index c2bd62f..d7e22c2 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -1011,6 +1011,11 @@ build_class_ref (tree type)
abort ();
prim_class = lookup_class (get_identifier (prim_class_name));
+ /* We wrap the class in a NOP_EXPR, because it is a
+ type. We can't hold it in the COMPONENT_REF itself,
+ as that type must remain NULL. */
+ prim_class = build1 (NOP_EXPR, prim_class, NULL_TREE);
+
return build3 (COMPONENT_REF, NULL_TREE,
prim_class, TYPE_identifier_node, NULL_TREE);
}