summaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2006-02-04 18:57:53 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2006-02-04 18:57:53 +0000
commit5460aa9c92db4858927d7a7c2118e71d7c90aa6d (patch)
treec0d1e0f40e8cd4dc49d6721aa72f8082ff6c8750 /gcc/java/decl.c
parentdd4ebf6ae9d708b231ad929bbe6fa900fb336a02 (diff)
downloadgcc-5460aa9c92db4858927d7a7c2118e71d7c90aa6d.tar.gz
decl.c (java_init_decl_processing): Create char_type_node as a regular INTEGER_TYPE node.
* decl.c (java_init_decl_processing): Create char_type_node as a regular INTEGER_TYPE node. (push_promoted_type): Preserve TYPE_STRING_FLAG on types. * typeck.c (convert): No longer check for CHAR_TYPEs but instead test for char_type_node and promoted_char_type_node as special instances of INTEGER_TYPE tree codes. (promote_type,build_java_signature): Likewise. * jcf-write.c (adjust_typed_op): Likewise. * mangle.c (mangle_type): Likewise. * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE. * parse.h (JINTEGRAL_TYPE_P): Likewise. From-SVN: r110592
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r--gcc/java/decl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index fd578594452..06da90bff73 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -538,6 +538,7 @@ push_promoted_type (const char *name, tree actual_type)
TYPE_MAX_VALUE (type) = copy_node (in_max);
TREE_TYPE (TYPE_MAX_VALUE (type)) = type;
TYPE_PRECISION (type) = TYPE_PRECISION (int_type_node);
+ TYPE_STRING_FLAG (type) = TYPE_STRING_FLAG (actual_type);
layout_type (type);
pushdecl (build_decl (TYPE_DECL, get_identifier (name), type));
return type;
@@ -738,7 +739,8 @@ java_init_decl_processing (void)
initializations of __FUNCTION__ and __PRETTY_FUNCTION__. */
short_array_type_node = build_prim_array_type (short_type_node, 200);
#endif
- char_type_node = make_node (CHAR_TYPE);
+ char_type_node = make_node (INTEGER_TYPE);
+ TYPE_STRING_FLAG (char_type_node) = 1;
TYPE_PRECISION (char_type_node) = 16;
fixup_unsigned_type (char_type_node);
pushdecl (build_decl (TYPE_DECL, get_identifier ("char"), char_type_node));