This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/19544] Difference in behaviour if default constructor added


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]