This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22238] [4.0/4.1 regression] '#'obj_type_ref' not supported by dump_expr
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jun 2005 03:19:39 -0000
- Subject: [Bug c++/22238] [4.0/4.1 regression] '#'obj_type_ref' not supported by dump_expr
- References: <20050629232130.22238.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2005-06-30 03:19 -------
Subject: Re: New: [4.0/4.1 regression] '#'obj_type_ref' not supported by dump_expr
"reichelt at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Since GCC 4.0.0 the compiler issues a hosed error message for the
| following invalid code snippet:
|
| ======================================
| struct A
| {
| virtual void foo();
| void bar() { if (foo()) ; }
| };
| ======================================
|
| The error message reads:
| bug.cc: In member function 'void A::bar()':
| bug.cc:4: error: could not convert '#'obj_type_ref' not supported by
| dump_expr#<expression error>(this)' to 'bool'
I think I crossed this silly behaviour from the error.c several types,
but it was always in a bigger context. Thanks for reducing it to this
small. I'll fix it.
| With GCC 3.4.4 I get
| bug.cc: In member function `void A::bar()':
| bug.cc:4: error: could not convert `(**((A*)this)->A::_vptr.A)(((A*)this))' to
| `bool'
| which is better, but not optimal.
Agreed.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22238