From: Nathan Sidwell Date: Mon, 27 Sep 2004 12:10:16 +0000 (+0000) Subject: re PR c++/17681 (Bad message about constructor ordering (-Wall)) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c81f61b2506d111b638e6aa329f87f78a289e379;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 16533f75683..a18a1fb4730 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 dd6affa3f83..2bd3dac92cb 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 da84e65a5be..a2242d61858 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 00000000000..65a9c58ceb2 --- /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\]." "" } + { } +};