c++: strict constexpr and local vars
A change I was working on made constexpr_searcher.cc start to fail, and when
I looked at it I wondered why it had been accepted before. This turned out
to be because we try to be more flexible about constant-evaluation of static
initializers, as allowed, but we were wrongly doing the same for non-static
initializers as well.
gcc/cp/ChangeLog:
* constexpr.cc (maybe_constant_init_1): Only pass false for
strict when initializing a variable of static duration.
libstdc++-v3/ChangeLog:
* testsuite/20_util/function_objects/constexpr_searcher.cc: Add
constexpr.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1y/constexpr-local4.C: New test.