]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Wed, 1 Feb 2006 11:46:53 +0000 (11:46 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Wed, 1 Feb 2006 11:46:53 +0000 (11:46 +0000)
2005-12-19  Mark Mitchell  <mark@codesourcery.com>

PR c++/24278
* init.c (expand_member_init): Print messages about baseclasses
using %T rather than %D.

* g++.dg/template/ctor5.C: New test.

From-SVN: r110471

gcc/cp/ChangeLog
gcc/cp/init.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/ctor5.C [new file with mode: 0644]

index 9c032d50aa46830190d5de3f9439ed17d3dfd76c..b3b7bf76b5648735b967b2897c181f7748fa20a1 100644 (file)
@@ -1,3 +1,12 @@
+2006-01-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       Backport:
+       2005-12-19  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/24278
+       * init.c (expand_member_init): Print messages about baseclasses
+       using %T rather than %D.
+
 2006-01-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        PR c++/16829
index 8064e4f58911c10649ded65a6b0a2c88a82b47ab..4e3cd4bef427e4fb9c81d4cdcf6faa53e3c562fe 100644 (file)
@@ -1015,11 +1015,11 @@ expand_member_init (tree name)
       if (!direct_binfo && !virtual_binfo)
        {
          if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
-           error ("type `%D' is not a direct or virtual base of `%T'",
-                  name, current_class_type);
+           error ("type `%T' is not a direct or virtual base of `%T'",
+                  basetype, current_class_type);
          else
-           error ("type `%D' is not a direct base of `%T'",
-                  name, current_class_type);
+           error ("type `%T' is not a direct base of `%T'",
+                  basetype, current_class_type);
          return NULL_TREE;
        }
 
index fa16199483fe0bb9baccb5a106b2168a1dd93e26..c8b173e854951128df4a7a437377b34cfb6c71de 100644 (file)
@@ -1,3 +1,11 @@
+2006-01-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       Backport:
+       2005-12-19  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/24278
+       * g++.dg/template/ctor5.C: New test.
+
 2006-01-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        PR c++/16829
diff --git a/gcc/testsuite/g++.dg/ext/ctor5.C b/gcc/testsuite/g++.dg/ext/ctor5.C
new file mode 100644 (file)
index 0000000..18e55d1
--- /dev/null
@@ -0,0 +1,8 @@
+// PR c++/24278
+
+template<typename T> struct A
+{
+  A() : T(0) {} // { dg-error "base" }
+};
+
+A<int*> a; // { dg-error "instantiated" }