public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50817] New: G++ emits errors containing lowered vtable references
@ 2011-10-21  8:17 manu at gcc dot gnu.org
  2011-10-21  8:19 ` [Bug c++/50817] " manu at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: manu at gcc dot gnu.org @ 2011-10-21  8:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50817

             Bug #: 50817
           Summary: G++ emits errors containing lowered vtable references
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: manu@gcc.gnu.org


struct a {
    virtual int bar();
  };

  struct foo : public virtual a {
  };

  void test(foo *P) {
    return P->bar() + *P;
  }

g++ revision 180166: 

 void test(foo*)
vtable.cc:9:22: error: no match for ‘operator+’ in ‘(((a*)P) +
((sizetype)(*(long int*)(P->foo::<anonymous>.a::_vptr.a +
0xffffffffffffffffffffffffffffffe0u))))->a::bar() + * P’
vtable.cc:9:22: error: return-statement with a value, in function returning
'void' [-fpermissive]

clang:

 t.cc:9:18: error: invalid operands to binary expression ('int' and 'foo')
    return P->bar() + *P;
           ~~~~~~~~ ^ ~~


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-12-01 17:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-21  8:17 [Bug c++/50817] New: G++ emits errors containing lowered vtable references manu at gcc dot gnu.org
2011-10-21  8:19 ` [Bug c++/50817] " manu at gcc dot gnu.org
2011-10-21  8:34 ` redi at gcc dot gnu.org
2011-10-21  8:35 ` redi at gcc dot gnu.org
2011-10-21 10:17 ` manu at gcc dot gnu.org
2011-10-21 11:32 ` paolo.carlini at oracle dot com
2011-10-21 11:39 ` manu at gcc dot gnu.org
2011-12-01 17:51 ` manu at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).