Re: Teach myself C++.



In message <871vnxij9t.fsf@xxxxxxxxxxxxxxxxxxxx>, Phil Carmody <thefatphil_demunged@xxxxxxxxxxx> writes
Richard Herring <junk@[127.0.0.1]> writes:
In message <87r5w1o1wl.fsf@xxxxxxxxxxxxxxxxxxxx>, Phil Carmody
<thefatphil_demunged@xxxxxxxxxxx> writes:
[SNIP - crap]
If you had read a little further on in the standard, you would have
found the section which is actually relevant to the code above, (12.2
[class.temporary])

Indeed. Fully retracted. I am familiar with Tom's complaint, as
it is one I made myself way back in the past. However, it appears
that the standardisation committee addressed such complaints
earlier than I previously thought.

Apologies.

Accepted, of course.

And before there was a standard, no doubt all bets were off. In Stroustrup (3rd edition, regrettably I didn't keep my copy of the 1st) there are words implying that temporaries "used to initialize a named object", whatever that means, might have an extended lifetime. I don't know what the ARM, the nearest thing to a de-facto pre-standard, says on this matter.

--
Richard Herring
.



Relevant Pages

  • Re: .bss section not initialized to zero.
    ... Phil Carmody wrote: ... > That disagrees with how GNU binutils define the .bss section. ... > On what authority do you base your claim? ... initialize it. ...
    (comp.lang.asm.x86)
  • Re: .bss section not initialized to zero.
    ... Phil Carmody wrote: ... gets killed for flameage... ... The loader for a dos .com file truely does not initialize the .bss ...
    (comp.lang.asm.x86)