------- 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" <[EMAIL PROTECTED]> 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

Reply via email to