[Bug c++/58102] rejects valid initialization of constexpr object with mutable member

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 18 13:34:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58102

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Nov 18 13:34:08 2014
New Revision: 217713

URL: https://gcc.gnu.org/viewcvs?rev=217713&root=gcc&view=rev
Log:
    PR c++/58102
    * typeck2.c (store_init_value): Set it.
    * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
    * constexpr.c (cxx_eval_outermost_constant_expr): Check it.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-mutable2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/typeck2.c



More information about the Gcc-bugs mailing list