mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-29 18:05:31 +08:00
cvt.c (perform_qualification_conversions): Use comp_target_types instead of comp_ptr_ttypes.
* cvt.c (perform_qualification_conversions): Use comp_target_types instead of comp_ptr_ttypes. From-SVN: r18838
This commit is contained in:
parent
04d02ece5e
commit
17b75c9182
@ -1,3 +1,8 @@
|
||||
Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
|
||||
|
||||
* cvt.c (perform_qualification_conversions): Use comp_target_types
|
||||
instead of comp_ptr_ttypes.
|
||||
|
||||
Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
|
||||
|
||||
* cp-tree.h (enforce_access): Declare.
|
||||
|
@ -1078,7 +1078,7 @@ perform_qualification_conversions (type, expr)
|
||||
tree type;
|
||||
tree expr;
|
||||
{
|
||||
if (comp_ptr_ttypes (type, TREE_TYPE(expr)))
|
||||
if (comp_target_types (type, TREE_TYPE (expr), 0) == 1)
|
||||
return build1 (NOP_EXPR, type, expr);
|
||||
else
|
||||
return error_mark_node;
|
||||
|
20
gcc/testsuite/g++.old-deja/g++.pt/nontype2.C
Normal file
20
gcc/testsuite/g++.old-deja/g++.pt/nontype2.C
Normal file
@ -0,0 +1,20 @@
|
||||
// Build don't link:
|
||||
|
||||
enum E { };
|
||||
|
||||
template <const E* ep>
|
||||
struct S1
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
struct S2
|
||||
{
|
||||
static E es[1];
|
||||
};
|
||||
|
||||
|
||||
struct S3
|
||||
{
|
||||
typedef S1<S2::es> S3_Type;
|
||||
};
|
Loading…
Reference in New Issue
Block a user