On Wed, Nov 23, 2016 at 11:36 AM, Jakub Jelinek wrote:
> On Wed, Nov 23, 2016 at 10:42:57AM -0500, Jason Merrill wrote:
>> OK, but I wonder why we don't do constant initialization of that variable...
>
> Dunno either, check_initializer simply returns the call to the constructor
> for the var. I'v
On Wed, Nov 23, 2016 at 10:42:57AM -0500, Jason Merrill wrote:
> OK, but I wonder why we don't do constant initialization of that variable...
Dunno either, check_initializer simply returns the call to the constructor
for the var. I've tried something like:
--- gcc/cp/decl.c.jj2016-11-21 19:4
OK, but I wonder why we don't do constant initialization of that variable...
On Wed, Nov 23, 2016 at 9:59 AM, Jakub Jelinek wrote:
> Hi!
>
> During cp_fold, we see a call to constructor and because the ctor
> is DECL_DECLARED_CONSTEXPR_P, when optimizing we call maybe_constant_value
> on it. But
Hi!
During cp_fold, we see a call to constructor and because the ctor
is DECL_DECLARED_CONSTEXPR_P, when optimizing we call maybe_constant_value
on it. But as when evaluating that we don't have an object, it returns
the initializer of the var, rather than an assignment of the initializer to
the v