This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22238] Awful error messages with virtual functions
- From: "gdr at cs dot tamu dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Aug 2007 20:27:26 -0000
- Subject: [Bug c++/22238] Awful error messages with virtual functions
- References: <bug-22238-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #15 from gdr at cs dot tamu dot edu 2007-08-21 20:27 -------
Subject: Re: Awful error messages with virtual functions
"reichelt at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| The pointer_plus_exprt stuff has been fixed.
|
| We are now back to error messages like
|
| bug.cc: In member function 'void B::bar()':
| bug.cc:4: error: could not convert '(((A*)this) + ((unsigned int)(*(int*)(
| ((B*)this)->B::_vptr.B + 0xfffffffffffffff4u))))->A::foo()' to 'bool'
Until we have a separate higher level representation in the C++
front-end, this is going to be hard to fix correctly. The alternative
is that we don't print expressions at all -- but that cure seems to me
to be worse than the disease.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22238