This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/22238] Awful error messages with virtual functions



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]