diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2003-08-07 12:49:57 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2003-08-07 12:49:57 +0000 |
commit | 7d1496792bf96d5364e31b90656539ce3539c608 (patch) | |
tree | f526fe69ca18f05fe4d77fb26284e92bd09419cf /gcc/cp/call.c | |
parent | d40c829f55c0b35e9b6ce9e9b7da9e6dc56a7941 (diff) | |
download | gcc-7d1496792bf96d5364e31b90656539ce3539c608.zip gcc-7d1496792bf96d5364e31b90656539ce3539c608.tar.gz gcc-7d1496792bf96d5364e31b90656539ce3539c608.tar.bz2 |
Make-lang.in (cp/call.o): Add dependency for target.h.
2003-08-07 Aldy Hernandez <aldyh@redhat.com>
* cp/Make-lang.in (cp/call.o): Add dependency for target.h.
* cp/call.c (standard_conversion): Support opaque types.
Include target.h.
(strip_top_quals): Use cp_build_qualified_type instead of
TYPE_MAIN_VARIANT.
* cp/typeck.c (convert_for_assignment): Support opaque types.
* testsuite/g++.dg/other/opaque-1.C: New.
* testsuite/g++.dg/other/opaque-2.C: New.
From-SVN: r70223
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index e8b2902..e77aaee 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -37,6 +37,7 @@ Boston, MA 02111-1307, USA. */ #include "expr.h" #include "diagnostic.h" #include "intl.h" +#include "target.h" #include "convert.h" static tree build_field_call (tree, tree, tree); @@ -568,7 +569,7 @@ strip_top_quals (tree t) { if (TREE_CODE (t) == ARRAY_TYPE) return t; - return TYPE_MAIN_VARIANT (t); + return cp_build_qualified_type (t, 0); } /* Returns the standard conversion path (see [conv]) from type FROM to type @@ -792,6 +793,10 @@ standard_conversion (tree to, tree from, tree expr) && ICS_STD_RANK (TREE_OPERAND (conv, 0)) <= PROMO_RANK) ICS_STD_RANK (conv) = PROMO_RANK; } + else if (fcode == VECTOR_TYPE && tcode == VECTOR_TYPE + && ((*targetm.vector_opaque_p) (from) + || (*targetm.vector_opaque_p) (to))) + return build_conv (STD_CONV, to, conv); else if (IS_AGGR_TYPE (to) && IS_AGGR_TYPE (from) && is_properly_derived_from (from, to)) { |