summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-12 14:25:48 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-12 14:25:48 +0000
commit01b7f6cd2f93be543e9e933bcab74172338ca739 (patch)
tree1e0d020d20c33cc0e5f0b108ebac2951ace73a98 /gcc/cp
parenta2fd87ad3939dd510c97af57c41ef07f68b75b20 (diff)
downloadgcc-01b7f6cd2f93be543e9e933bcab74172338ca739.tar.gz
2008-03-12 Richard Guenther <rguenther@suse.de>
PR c++/35469 Revert: 2008-02-04 Richard Guenther <rguenther@suse.de> PR java/35035 * decl.c (record_builtin_java_type): Make jboolean a integer type again where its mode doesn't match that of bool. 2008-01-25 Richard Guenther <rguenther@suse.de> PR c++/33887 * decl.c (record_builtin_java_type): Make __java_boolean a variant of bool. * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check after TYPE_MAIN_VARIANT check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133142 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog18
-rw-r--r--gcc/cp/decl.c13
-rw-r--r--gcc/cp/typeck.c5
3 files changed, 22 insertions, 14 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 673bc6ac524..c73fd6b25d5 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,21 @@
+2008-03-12 Richard Guenther <rguenther@suse.de>
+
+ PR c++/35469
+ Revert:
+ 2008-02-04 Richard Guenther <rguenther@suse.de>
+
+ PR java/35035
+ * decl.c (record_builtin_java_type): Make jboolean a
+ integer type again where its mode doesn't match that of bool.
+
+ 2008-01-25 Richard Guenther <rguenther@suse.de>
+
+ PR c++/33887
+ * decl.c (record_builtin_java_type): Make __java_boolean
+ a variant of bool.
+ * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
+ after TYPE_MAIN_VARIANT check.
+
2008-03-10 Jakub Jelinek <jakub@redhat.com>
PR c++/35328
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index a9b068c655e..2318f6912d0 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3159,19 +3159,10 @@ record_builtin_java_type (const char* name, int size)
tree type, decl;
if (size > 0)
type = make_signed_type (size);
- else if (size == -1)
- { /* "__java_boolean". */
- if ((TYPE_MODE (boolean_type_node)
- == smallest_mode_for_size (1, MODE_INT)))
- type = build_variant_type_copy (boolean_type_node);
- else
- /* ppc-darwin has SImode bool, make jboolean a 1-bit
- integer type without boolean semantics there. */
- type = make_unsigned_type (1);
- }
else if (size > -32)
- { /* "__java_char". */
+ { /* "__java_char" or ""__java_boolean". */
type = make_unsigned_type (-size);
+ /*if (size == -1) TREE_SET_CODE (type, BOOLEAN_TYPE);*/
}
else
{ /* "__java_float" or ""__java_double". */
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index d0eaf981a8a..fa4c3ad27c1 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -962,6 +962,8 @@ structural_comptypes (tree t1, tree t2, int strict)
if (TREE_CODE (t1) != ARRAY_TYPE
&& TYPE_QUALS (t1) != TYPE_QUALS (t2))
return false;
+ if (TYPE_FOR_JAVA (t1) != TYPE_FOR_JAVA (t2))
+ return false;
/* Allow for two different type nodes which have essentially the same
definition. Note that we already checked for equality of the type
@@ -971,9 +973,6 @@ structural_comptypes (tree t1, tree t2, int strict)
&& TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2))
return true;
- if (TYPE_FOR_JAVA (t1) != TYPE_FOR_JAVA (t2))
- return false;
-
/* Compare the types. Break out if they could be the same. */
switch (TREE_CODE (t1))
{