This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30340] pure virtual function called on const & declared with previous declaration without a definition, const & assigned by temporary
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jan 2007 09:47:55 -0000
- Subject: [Bug c++/30340] pure virtual function called on const & declared with previous declaration without a definition, const & assigned by temporary
- References: <bug-30340-13845@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from gdr at integrable-solutions dot net 2007-01-01 09:47 -------
Subject: Re: pure virtual function called on const & declared with previous
declaration without a definition, const & assigned by temporary
"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| For the last question on this code:
| C c(1, B());
|
| What is the life time of the temp that holds B()?
That temporary is destroyed at the of the declaration of "c" --
e.g. "right before the semicolon" if I'm allowed that expression.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30340