This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/49528] [4.6 regression] g++ fails to destroy temporary object when subobject is used to initialize a reference


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49528

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2011-06-27 20:16:21 UTC ---
Author: jason
Date: Mon Jun 27 20:16:14 2011
New Revision: 175559

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175559
Log:
    PR c++/49528
    * semantics.c (potential_constant_expression_1): A TARGET_EXPR
    of non-literal type isn't constant.
    (cxx_eval_constant_expression): Likewise.
    * init.c (expand_default_init): Use maybe_constant_init.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-cleanup.C
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/init/ref19.C
Modified:
    branches/gcc-4_6-branch/gcc/cp/ChangeLog
    branches/gcc-4_6-branch/gcc/cp/init.c
    branches/gcc-4_6-branch/gcc/cp/semantics.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]