This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14458] 3.4 Regression : const_cast suddenly (treated as) temporary?
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Mar 2004 16:27:39 -0000
- Subject: [Bug c++/14458] 3.4 Regression : const_cast suddenly (treated as) temporary?
- References: <20040306152704.14458.carlo@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pcarlini at suse dot de 2004-03-06 16:27 -------
According to 5.2.11, p1: "The result of the expression const_cast<T>(v) is of
type T. If T is a reference type, the result is an lvalue; otherwise, the result
is an rvalue and, ...", therefore the current behavior seems definitely correct.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14458