From c81f61b2506d111b638e6aa329f87f78a289e379 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Mon, 27 Sep 2004 12:10:16 +0000 Subject: [PATCH] re PR c++/17681 (Bad message about constructor ordering (-Wall)) 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 | 3 +++ gcc/cp/error.c | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/other/error9.C | 20 ++++++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/other/error9.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 16533f7..a18a1fb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2004-09-27 Nathan Sidwell + 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 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index dd6affa..2bd3dac 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index da84e65..a2242d6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-09-27 Nathan Sidwell + + PR c++/17681 + * g++.dg/other/error9.C: New test. + 2004-09-26 Ulrich Weigand * 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 index 0000000..65a9c58 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/error9.C @@ -0,0 +1,20 @@ +// { dg-options -Wall } + +// Copyright (C) 2004 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 27 Sept 2004 + +// 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\]." "" } + { } +}; -- 2.7.4