public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19816] C++ front-end produces a cast instead of just &a.b (empty base class)
       [not found] <bug-19816-6528@http.gcc.gnu.org/bugzilla/>
@ 2010-09-09 11:06 ` hubicka at gcc dot gnu dot org
  2010-09-13 14:57 ` jason at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2010-09-09 11:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hubicka at gcc dot gnu dot org  2010-09-09 11:05 -------
Hmm, my system compiles (4.3.2) gets:
_Z1fv:
.LFB2:
        subq    $24, %rsp
.LCFI0:
        leaq    23(%rsp), %rdi
        call    _ZN4baseC2Ev
        addq    $24, %rsp
        ret
.LFE2:

this seems OK to me?


-- 


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


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

* [Bug c++/19816] C++ front-end produces a cast instead of just &a.b (empty base class)
       [not found] <bug-19816-6528@http.gcc.gnu.org/bugzilla/>
  2010-09-09 11:06 ` [Bug c++/19816] C++ front-end produces a cast instead of just &a.b (empty base class) hubicka at gcc dot gnu dot org
@ 2010-09-13 14:57 ` jason at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-09-13 14:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jason at gcc dot gnu dot org  2010-09-13 14:57 -------
This isn't a bug.  We produce a cast here because no field is generated for an
empty base class.  From class.c:

/* We do not create a FIELD_DECL for empty base classes because it might
overlap some other field.  We want to be able to create CONSTRUCTORs for the
class by iterating over the FIELD_DECLs, and the back end does not handle
overlapping FIELD_DECLs.  */


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug c++/19816] C++ front-end produces a cast instead of just &a.b (empty base class)
  2005-02-08 15:09 [Bug c++/19816] New: " pinskia at gcc dot gnu dot org
@ 2005-03-17 17:50 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-17 17:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-17 17:50 -------
Confirmed

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |missed-optimization, TREE
   Last reconfirmed|0000-00-00 00:00:00         |2005-03-17 17:50:13
               date|                            |


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


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

end of thread, other threads:[~2010-09-13 14:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19816-6528@http.gcc.gnu.org/bugzilla/>
2010-09-09 11:06 ` [Bug c++/19816] C++ front-end produces a cast instead of just &a.b (empty base class) hubicka at gcc dot gnu dot org
2010-09-13 14:57 ` jason at gcc dot gnu dot org
2005-02-08 15:09 [Bug c++/19816] New: " pinskia at gcc dot gnu dot org
2005-03-17 17:50 ` [Bug c++/19816] " pinskia at gcc dot gnu dot 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).