Bug 17681 - [4.0 Regression] Bad message about constructor ordering (-Wall)
Summary: [4.0 Regression] Bad message about constructor ordering (-Wall)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.0
: P2 critical
Target Milestone: 4.0.0
Assignee: Nathan Sidwell
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2004-09-26 19:46 UTC by Václav Haisman
Modified: 2004-09-27 12:06 UTC (History)
3 users (show)

See Also:
Host: i386-unknown-freebsd4.10
Target: i386-unknown-freebsd4.10
Build: i386-unknown-freebsd4.10
Known to work:
Known to fail:
Last reconfirmed: 2004-09-26 19:54:34


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Václav Haisman 2004-09-26 19:46:26 UTC
There is something wrong with the warning about constructor ordering:

wilx@logout:::~/tmp> cat order.cxx
struct A
{ };

struct B
{ };

struct C : public B, public A
{
  C ()
    : A(), B()
  { }
};

wilx@logout:::~/tmp> g++ -Wall -c order.cxx
order.cxx: In constructor `C::C()':
order.cxx:10: warning: base `#`tree_binfo' not supported by dump_type#<type
error>' will be initialized after
order.cxx:10: warning:   base `#`tree_binfo' not supported by dump_type#<type
error>'
order.cxx:9: warning:   when initialized here

wilx@logout:::~/tmp> g++ -v
Reading specs from /home/4/wilx/lib/gcc/i386-unknown-freebsd4.10/4.0.0/specs
Configured with: ../srcdir/configure --disable-nls
--enable-version-specific-runtime-libs --enable-dwarf2 --with-cpu=pentium3
--with-arch=pentium3 --with-system-zlib --disable-shared --prefix=/home/4/wilx
--enable-languages=c,c++,objc --disable-sjlj-exceptions
--enable-shared=libstdc++ --enable-shared=libobjc --with-gc=zone
Thread model: posix
gcc version 4.0.0 20040926 (experimental)
Comment 1 Andrew Pinski 2004-09-26 19:54:34 UTC
Confirmed, this is a regression.
Comment 2 Giovanni Bajo 2004-09-27 03:24:22 UTC
Prolly caused by Nathan's patches, as Andrew noticed
Comment 3 Nathan Sidwell 2004-09-27 12:06:21 UTC
2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>

	PR c++/17681
	* error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
Comment 4 GCC Commits 2004-09-27 12:10:33 UTC
Subject: Bug 17681

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	nathan@gcc.gnu.org	2004-09-27 12:10:22

Modified files:
	gcc/cp         : error.c ChangeLog 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/other: error9.C 

Log message:
	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.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&r1=1.263&r2=1.264
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4386&r2=1.4387
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/error9.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4355&r2=1.4356