]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cvt.c (perform_qualification_conversions): Use comp_target_types instead of comp_ptr_...
authorMark Mitchell <mmitchell@usa.net>
Thu, 26 Mar 1998 10:23:14 +0000 (10:23 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 26 Mar 1998 10:23:14 +0000 (10:23 +0000)
* cvt.c (perform_qualification_conversions): Use comp_target_types
instead of comp_ptr_ttypes.

From-SVN: r18838

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

index ba6309b6a40b5a5c8d9af7f045b954711e12991f..7e665274fb994220fa2fed74443beaed93a642f1 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 de8dec765a422be0df7f395d66e398af1e23140c..dfaee3c09349cb26faba92f3c7d9ee20f1e8cc7f 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;
+};