diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-09-27 12:10:16 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-09-27 12:10:16 +0000 |
commit | c81f61b2506d111b638e6aa329f87f78a289e379 (patch) | |
tree | 0fde7ed074a1a5422f7e90e033181e109e1ce5bb | |
parent | 8d83768f785fecd3b735b7e97b8d33d9c2ed7608 (diff) | |
download | gcc-c81f61b2506d111b638e6aa329f87f78a289e379.zip gcc-c81f61b2506d111b638e6aa329f87f78a289e379.tar.gz gcc-c81f61b2506d111b638e6aa329f87f78a289e379.tar.bz2 |
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
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/error.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/error9.C | 20 |
4 files changed, 29 insertions, 1 deletions
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 <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 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 <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 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 <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\]." "" } + { } +}; |