decl.c (record_builtin_java_type): Use canonicalized integer types.

* decl.c (record_builtin_java_type): Use canonicalized integer
types.

From-SVN: r144664
This commit is contained in:
Alexandre Oliva 2009-03-06 09:10:46 +00:00 committed by Alexandre Oliva
parent 47ed69db7e
commit 2dc6d6660a
2 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2009-03-06 Alexandre Oliva <aoliva@redhat.com>
* decl.c (record_builtin_java_type): Use canonicalized integer
types.
2009-03-04 Jason Merrill <jason@redhat.com> 2009-03-04 Jason Merrill <jason@redhat.com>
PR c++/38908 PR c++/38908

View File

@ -3168,10 +3168,18 @@ record_builtin_java_type (const char* name, int size)
{ {
tree type, decl; tree type, decl;
if (size > 0) if (size > 0)
type = make_signed_type (size); type = build_nonstandard_integer_type (size, 0);
else if (size > -32) else if (size > -32)
{ /* "__java_char" or ""__java_boolean". */ {
type = make_unsigned_type (-size); tree stype;
/* "__java_char" or ""__java_boolean". */
type = build_nonstandard_integer_type (-size, 1);
/* Get the signed type cached and attached to the unsigned type,
so it doesn't get garbage-collected at "random" times,
causing potential codegen differences out of different UIDs
and different alias set numbers. */
stype = build_nonstandard_integer_type (-size, 0);
TREE_CHAIN (type) = stype;
/*if (size == -1) TREE_SET_CODE (type, BOOLEAN_TYPE);*/ /*if (size == -1) TREE_SET_CODE (type, BOOLEAN_TYPE);*/
} }
else else