On Thu, Mar 21, 2019 at 07:27:03PM -0400, Jason Merrill wrote:
> On 3/15/19 4:07 PM, Jakub Jelinek wrote:
> > +/* Number of cxx_eval_constant_expression calls (except skipped ones,
> > +   on simple constants or location wrappers) encountered during current
> > +   cxx_eval_outermost_constant_expr call.  */
> > +static HOST_WIDE_INT constexpr_ops_count;
> 
> Hmm, a global static variable is non-reentrant.  This may not be an issue in
> practice because of instantiate_constexpr_fns, but still seems questionable.

One option would be to add HOST_WIDE_INT *constexpr_ops_count; into
constexpr_ctx structure (pointer, not the counter itself, because we
  constexpr_ctx new_ctx = *ctx;
  ... (&new_ctx, ...)
).

        Jakub

Reply via email to