From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26277 invoked by alias); 20 Jan 2005 19:25:52 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 25555 invoked by uid 48); 20 Jan 2005 19:25:14 -0000 Date: Thu, 20 Jan 2005 19:25:00 -0000 Message-ID: <20050120192514.25554.qmail@sourceware.org> From: "chris at bubblescope dot net" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050120125055.19544.chris@bubblescope.net> References: <20050120125055.19544.chris@bubblescope.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libstdc++/19544] Difference in behaviour if default constructor added X-Bugzilla-Reason: CC X-SW-Source: 2005-01/txt/msg02870.txt.bz2 List-Id: ------- 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::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