Hi,
On Friday 25 February 2011 19:37:27 Jonathan Wakely wrote:
> On 25 February 2011 17:05, Matthias Kretz wrote:
> > I'm saying that the way I thought about const + ctor seems logical (if
> > you are not a compiler developer at least :-) ). Regardless of how well
> > defined "return value" is in
On 25 February 2011 17:05, Matthias Kretz wrote:
>
> I'm saying that the way I thought about const + ctor seems logical (if you are
> not a compiler developer at least :-) ). Regardless of how well defined
> "return value" is in the standards, to me as C++ developer the ctor acts as a
> function th
Hi,
I don't generally disagree, that GCC does the correct thing here. I'm
completely satisfied if you don't change GCC.
I'm saying that the way I thought about const + ctor seems logical (if you are
not a compiler developer at least :-) ). Regardless of how well defined
"return value" is in th
On 25/02/2011 15:43, Matthias Kretz wrote:
> I fully understand why it happened. So I imply your answer is that ctors do
> not have a return value and my expectation, as explained above, is wrong.
You'd already know if ctors had return values, because you'd have had to be
writing return statem
On 25/02/2011 16:43, Matthias Kretz wrote:
Hi,
On Friday 25 February 2011 16:26:24 Richard Guenther wrote:
On Fri, Feb 25, 2011 at 4:19 PM, Matthias Kretz wrote:
My expectation was, that, since the ctor has a constructed object as
return value, the compiler is free, instead of calling a ctor t
Hi,
On Friday 25 February 2011 16:26:24 Richard Guenther wrote:
> On Fri, Feb 25, 2011 at 4:19 PM, Matthias Kretz wrote:
> > My expectation was, that, since the ctor has a constructed object as
> > return value, the compiler is free, instead of calling a ctor twice for
> > the case of e.g.
> > Foo
On Fri, Feb 25, 2011 at 4:19 PM, Matthias Kretz
wrote:
> Hi,
>
> what are the exact semantics of __attribute__((const)), when attached to a C++
> class constructor, supposed to be?
>
> My expectation was, that, since the ctor has a constructed object as return
> value, the compiler is free, instea
Hi,
what are the exact semantics of __attribute__((const)), when attached to a C++
class constructor, supposed to be?
My expectation was, that, since the ctor has a constructed object as return
value, the compiler is free, instead of calling a ctor twice for the case of
e.g.
Foo a(1);
Foo b(1)