public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "chris at bubblescope dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/19544] Difference in behaviour if default constructor added
Date: Thu, 20 Jan 2005 19:25:00 -0000	[thread overview]
Message-ID: <20050120192514.25554.qmail@sourceware.org> (raw)
In-Reply-To: <20050120125055.19544.chris@bubblescope.net>


------- Additional Comments From chris at bubblescope dot net  2005-01-20 19:25 -------
I never thought it was a bug in the library :)

I however throught (incorrectly) that copying an unassigned pointer was valid,
mainly as some other test case was considering constructing
std::vector<std::list<int>::iterator> v(1). Now I realise that in fact copying
an unassigned pointer is undefined behaviour, so of course the error is fine :)
Sorry

I'm still curious as to why the error doesn't appear if let g++ generate a
default constructor, as from my reading of 12.1/7, the default generated
constructor should be "ptr() {}", so the error should still appear. Am I reading
it wrong?

-- 


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


  parent reply	other threads:[~2005-01-20 19:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-20 12:51 [Bug c++/19544] New: " chris at bubblescope dot net
2005-01-20 14:56 ` [Bug libstdc++/19544] " pinskia at gcc dot gnu dot org
2005-01-20 15:14 ` chris at bubblescope dot net
2005-01-20 15:21 ` pinskia at gcc dot gnu dot org
2005-01-20 19:19 ` gdr at integrable-solutions dot net
2005-01-20 19:25 ` chris at bubblescope dot net [this message]
2005-01-20 19:42 ` gdr at integrable-solutions dot net
2005-01-20 20:46 ` bangerth at dealii dot org
2005-01-20 21:04 ` caj at cs dot york dot ac dot uk
2005-01-21  2:25 ` gdr at integrable-solutions dot net
2005-01-21  2:28 ` 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=20050120192514.25554.qmail@sourceware.org \
    --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: link
Be 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).