aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r--gcc/java/decl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index e958136..0ee2374 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -606,7 +606,14 @@ java_init_decl_processing (void)
/* This is not a java type, however tree-dfa requires a definition for
size_type_node. */
- size_type_node = make_unsigned_type (POINTER_SIZE);
+ if (strcmp (SIZE_TYPE, "unsigned int") == 0)
+ size_type_node = make_unsigned_type (INT_TYPE_SIZE);
+ else if (strcmp (SIZE_TYPE, "long unsigned int") == 0)
+ size_type_node = make_unsigned_type (LONG_TYPE_SIZE);
+ else if (strcmp (SIZE_TYPE, "long long unsigned int") == 0)
+ size_type_node = make_unsigned_type (LONG_LONG_TYPE_SIZE);
+ else
+ gcc_unreachable ();
set_sizetype (size_type_node);
/* Define these next since types below may used them. */