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] [4.0/4.1 regression] '#'obj_type_ref' not supported by dump_expr


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


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