]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/ChangeLog
re PR c++/49528 (g++ fails to destroy temporary object when subobject is used to...
authorJason Merrill <jason@redhat.com>
Sun, 26 Jun 2011 14:00:33 +0000 (10:00 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 26 Jun 2011 14:00:33 +0000 (10:00 -0400)
commit07a9e891c9cbb1df6aa33edbe39c21d948da2301
treeb9daf9f1abc1a91a7cacbb85a1df30a46c2c7cc5
parent4ff10c0ec2db831023cc9c2a3242e8580beb3ec8
re PR c++/49528 (g++ fails to destroy temporary object when subobject is used to initialize a reference)

PR c++/49528
* semantics.c (potential_constant_expression_1): A TARGET_EXPR
with a cleanup isn't constant.
(cxx_eval_constant_expression): Likewise.
* init.c (expand_default_init): Use maybe_constant_init.

From-SVN: r175409
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-cleanup.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/ref19.C [new file with mode: 0644]