🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1011

RTFM. Was: g++ 2.2.2 - prob in temp obj. as function argument

#1011
From: David Kastrup
Date: Fri, 02 Oct 1992 17:12
14 lines
1264 bytes
In ARM it is clearly specified, that the only things you are allowed to
do with a temporary is
1) use the whole fu... thing. The moment you select a component, poof,
the rest may vanish. You could assign to a variable, i.e.
2) bind a reference to it. This is the most feasable thing. Then the
temporary is guaranteed to exist till the end of the block.

However, I would consider a warning by the compiler appropriate, where
the compiler can because of the function definition swee that such a
thing might happen.

And I would absolutely be against trying to introduce a longer life
for temporaries, because then even more difficult situations are
probable to foul up. Read ARM for your enlightenment.
Technical Details
Message-ID: <dak.718045955@kaa>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!kaa.informatik.rwth-aachen.de!dak
References: <1992Oct1.052227.26859@nuscc.nus.sg>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!kaa.informatik.rwth-aachen.de!dak
From: dak@kaa.informatik.rwth-aachen.de (David Kastrup)
Subject: RTFM. Was: g++ 2.2.2 - prob in temp obj. as function argument
Message-ID: <dak.718045955@kaa>
Sender: gnulists@ai.mit.edu
Organization: Rechnerbetrieb Informatik  /  RWTH Aachen
References: <1992Oct1.052227.26859@nuscc.nus.sg>
Distribution: gnu
Date: Fri, 2 Oct 1992 17:12:35 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 15