diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-01-25 21:20:00 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-01-25 21:20:00 +0000 |
commit | dc8d590cea2a196d215e7f5ae4298a0cf1a577e9 (patch) | |
tree | 6c9c32c8b536350e4f75a616d13be07a3bd41e61 /gcc/cp/typeck.c | |
parent | 2cc20bba00bc2ec64ab4e3c30566d5ed05214105 (diff) | |
download | ppe42-gcc-dc8d590cea2a196d215e7f5ae4298a0cf1a577e9.tar.gz ppe42-gcc-dc8d590cea2a196d215e7f5ae4298a0cf1a577e9.zip |
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@131840 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/typeck.c')
-rw-r--r-- | gcc/cp/typeck.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 655763772f9..d75f4e49c37 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -962,8 +962,6 @@ 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 @@ -973,6 +971,9 @@ 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)) { |