https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19544
Nic Brown changed:
What|Removed |Added
CC||nic at buymore dot pro
--- Comment #11 from
--- Additional Comments From gdr at integrable-solutions dot net
2005-01-21 02:28 ---
Subject: Re: Difference in behaviour if default constructor added
"caj at cs dot york dot ac dot uk" <[EMAIL PROTECTED]> writes:
| Subject: Re: Difference in behaviour if default constructor
| adde
--- Additional Comments From gdr at integrable-solutions dot net
2005-01-21 02:25 ---
Subject: Re: Difference in behaviour if default constructor added
"bangerth at dealii dot org" <[EMAIL PROTECTED]> writes:
| To be completely clear, the compiler generated default constructor is
|
--- Additional Comments From caj at cs dot york dot ac dot uk 2005-01-20
21:04 ---
Subject: Re: Difference in behaviour if default constructor
added
bangerth at dealii dot org wrote:
>--- Additional Comments From bangerth at dealii dot org 2005-01-20 20:46
>---
>To be compl
--- Additional Comments From bangerth at dealii dot org 2005-01-20 20:46
---
To be completely clear, the compiler generated default constructor is
ptr() : a(0) {}
not
ptr() {}
Thus, it _does_ initialize 'a'.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19544
--- Additional Comments From gdr at integrable-solutions dot net
2005-01-20 19:42 ---
Subject: Re: Difference in behaviour if default constructor added
"chris at bubblescope dot net" <[EMAIL PROTECTED]> writes:
| I'm still curious as to why the error doesn't appear if let g++ generate
--- 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>
--- Additional Comments From gdr at integrable-solutions dot net
2005-01-20 19:19 ---
Subject: Re: New: Difference in behaviour if default constructor added
"chris at bubblescope dot net" <[EMAIL PROTECTED]> writes:
| While looking at PR 19510, I noticed the following strangeness.
|
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-20
15:21 ---
Invalid, as you default constructor is not doing its job of initializing:
ptr() {}
--
What|Removed |Added
--
--- Additional Comments From chris at bubblescope dot net 2005-01-20 15:14
---
Heres another test-case...
#include
struct ptr
{
int* a;
ptr() {}
};
struct foo
{
ptr array[1];
foo() { std::uninitalized_fill_n(array,1,ptr()); }
};
foo f;
Which shows it isn't limited to libstdc++ (assu
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-20
14:56 ---
This is a library bug.
--
What|Removed |Added
Component|c++
11 matches
Mail list logo