re PR c++/17681 (Bad message about constructor ordering (-Wall))
authorNathan Sidwell <nathan@codesourcery.com>
Mon, 27 Sep 2004 12:10:16 +0000 (12:10 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 27 Sep 2004 12:10:16 +0000 (12:10 +0000)
cp:
PR c++/17681
* error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
testsuite:
PR c++/17681
* g++.dg/other/error9.C: New test.

From-SVN: r88170

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/error9.C [new file with mode: 0644]

index 16533f75683a511c19cd60aadba51a05bfe903cd..a18a1fb4730d165d2e94fc663cee3ebd3c734be2 100644 (file)
@@ -1,5 +1,8 @@
 2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
 
+       PR c++/17681
+       * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
+
        * class.c (struct count_depth_data): Remove.
        (dfs_depth_post, dfs_depth_q): Remove.
        (find_final_overrider): Use number of vbase classes as depth
index dd6affa3f83aa3d9a8ba2c752b1d7f79d0c7ed64..2bd3dac92cba839446c693c750cb0254ad95d253 100644 (file)
@@ -272,7 +272,7 @@ dump_type (tree t, int flags)
       pp_cxx_tree_identifier (cxx_pp, t);
       break;
 
-    case TREE_VEC:
+    case TREE_BINFO:
       dump_type (BINFO_TYPE (t), flags);
       break;
 
index da84e65a5bee55a42cf7bcb11962cdcca7e702bc..a2242d6185868c57ae0cd9a382fec8a0edf69b33 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
+
+       PR c++/17681
+       * g++.dg/other/error9.C: New test.
+
 2004-09-26  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * gcc.dg/tree-ssa/loop-1.c: Use -msmall-exec on s390-*-* targets.
diff --git a/gcc/testsuite/g++.dg/other/error9.C b/gcc/testsuite/g++.dg/other/error9.C
new file mode 100644 (file)
index 0000000..65a9c58
--- /dev/null
@@ -0,0 +1,20 @@
+// { dg-options -Wall }
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 27 Sept 2004 <nathan@codesourcery.com>
+
+// Origin:      v.haisman@sh.cvut.cz
+// Bug 17681: bad diagnostic text.
+
+struct A
+{ };
+
+struct B
+{ };
+
+struct C : public B, public A
+{
+  C ()  // { dg-warning "when initialized" "" }
+    : A(), B()  // { dg-warning "base .\[AB\]." "" }
+  { }
+};