From 063fb392d218bfecd0d60dc790a94cf7208b92aa Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Mon, 8 Aug 2005 14:56:18 +0000 Subject: 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) : Extract the primary class type from the NOP_EXPR in which it was placed. From-SVN: r102859 --- gcc/java/class.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/java/class.c') 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); } -- cgit v1.1