public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "greg dot bertin at solacesystems dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/13864] stl_hastable.h Line 527 Date: Mon, 26 Jan 2004 14:28:00 -0000 [thread overview] Message-ID: <20040126142811.1823.qmail@sources.redhat.com> (raw) In-Reply-To: <20040126054235.13864.greg.bertin@solacesystems.com> ------- Additional Comments From greg dot bertin at solacesystems dot com 2004-01-26 14:28 ------- Subject: RE: stl_hastable.h Line 527 Actually this is my idiocy ... you are quite correct. Copy constructors must assume they are working with uninitialized memory ... my fault ... sorry!! > -----Original Message----- > From: gdr at integrable-solutions dot net [mailto:gcc- > bugzilla@gcc.gnu.org] > Sent: Monday, January 26, 2004 1:39 AM > To: greg.bertin@solacesystems.com > Subject: [Bug libstdc++/13864] stl_hastable.h Line 527 > > > ------- Additional Comments From gdr at integrable-solutions dot net > 2004-01-26 06:38 ------- > Subject: Re: New: stl_hastable.h Line 527 > > "greg dot bertin at solacesystems dot com" <gcc-bugzilla@gcc.gnu.org> > writes: > > | _Construct(&__n->_M_val, __obj); being called with an unitialized memory > | pointer (__n) being passed as the first parameter (i.e. it is memory > allocated > | from an allocator in line 524). Memory should be default constructed > first to > | ensure the class' copy constructor behaves properly: > | > | try { > | _Construct(&__n->_M_val); > | _Construct(&__n->_M_val, __obj); > | return __n; > | } > > I don't understand. Why should a default construction be needed > before a copy-construction? A constructor is called only once in an > object lifetime. > > -- Gaby > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13864 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13864
next prev parent reply other threads:[~2004-01-26 14:28 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-01-26 5:42 [Bug libstdc++/13864] New: " greg dot bertin at solacesystems dot com 2004-01-26 6:38 ` [Bug libstdc++/13864] " gdr at integrable-solutions dot net 2004-01-26 13:23 ` pinskia at gcc dot gnu dot org 2004-01-26 14:20 ` greg dot bertin at solacesystems dot com 2004-01-26 14:27 ` greg dot bertin at solacesystems dot com 2004-01-26 14:28 ` greg dot bertin at solacesystems dot com [this message] 2004-01-26 14:30 ` pinskia at gcc dot gnu dot org 2004-01-26 14:41 ` gdr at integrable-solutions dot net
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040126142811.1823.qmail@sources.redhat.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).