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]

Re: bug report for egcs-1.0.3


On Fri, 24 Jul 1998, Mike Brennan wrote:
> Here is an internal compiler error report.

Thanks for the report.

> struct Foo {
> virtual bool is_foo() { return true ;}
> } ;
>
> void bar(Foo* f)
> {
>   if (f && f->is_foo) {}
> }

> t.C: In function `void bar(struct Foo *)':
> t.C:10: Internal compiler error.
> t.C:10: Please submit a full bug report to `egcs-bugs@cygnus.com'.


With a current snapshot of egcs on i386-unknown-freebsd2.2.6 I do not get
an internal compiler error but the following instead (which still looks
_very_ weird to me)!


x.cc: In function `void bar(struct Foo *)':
x.cc:8: warning: assuming & on `(f->Foo::_vptr$Foo + 8)->__vtbl_ptr_type::__pfn'
x.cc:8: cannot convert `(f->Foo::_vptr$Foo + 8)' from type `const __vtbl_ptr_type *' to type `bool (Foo::*)()'
x.cc:8: warning: assuming pointer to member function is non-virtual

Gerald
-- 
Gerald Pfeifer (Jerry)      Vienna University of Technology
pfeifer@dbai.tuwien.ac.at   http://www.dbai.tuwien.ac.at/~pfeifer/




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