public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/19816] New: C++ front-end produces a cast instead of just &a.b (empty base class) @ 2005-02-08 15:09 pinskia at gcc dot gnu dot org 2005-03-17 17:50 ` [Bug c++/19816] " pinskia at gcc dot gnu dot org 0 siblings, 1 reply; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-02-08 15:09 UTC (permalink / raw) To: gcc-bugs For the following code, the C++ front-end produces a case instead of doing &v.base which seems wrong in my mind. struct base { base(); }; struct vector : public base { }; int f() { vector v; } This might be the cause of PR 19786 but it might not (I have not looked at the aliasing sets for that bug yet). -- Summary: C++ front-end produces a cast instead of just &a.b (empty base class) Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: minor Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19816 ^ permalink raw reply [flat|nested] 4+ 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: C++ front-end produces a cast instead of just &a.b (empty base class) pinskia at gcc dot gnu dot org @ 2005-03-17 17:50 ` pinskia at gcc dot gnu dot org 0 siblings, 0 replies; 4+ 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] 4+ messages in thread
[parent not found: <bug-19816-6528@http.gcc.gnu.org/bugzilla/>]
* [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; 4+ 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] 4+ 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 ` hubicka at gcc dot gnu dot org @ 2010-09-13 14:57 ` jason at gcc dot gnu dot org 1 sibling, 0 replies; 4+ 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] 4+ messages in thread
end of thread, other threads:[~2010-09-13 14:57 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-02-08 15:09 [Bug c++/19816] New: C++ front-end produces a cast instead of just &a.b (empty base class) pinskia at gcc dot gnu dot org 2005-03-17 17:50 ` [Bug c++/19816] " pinskia at gcc dot gnu dot org [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
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).