OSDN Git Service

* cvt.c (perform_qualification_conversions): Use comp_target_types
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Mar 1998 10:23:14 +0000 (10:23 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Mar 1998 10:23:14 +0000 (10:23 +0000)
instead of comp_ptr_ttypes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18838 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/cvt.c
gcc/testsuite/g++.old-deja/g++.pt/nontype2.C [new file with mode: 0644]

index ba6309b..7e66527 100644 (file)
@@ -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.
index de8dec7..dfaee3c 100644 (file)
@@ -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;
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/nontype2.C b/gcc/testsuite/g++.old-deja/g++.pt/nontype2.C
new file mode 100644 (file)
index 0000000..e181411
--- /dev/null
@@ -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;
+};