Re: [PATCH] c++: Fix ICE with template codes in check_narrowing [PR91465]

2020-02-09 Thread Jason Merrill
On 2/6/20 7:30 PM, Marek Polacek wrote: In ed4f2c001a883b2456fc607a33f1c59f9c4ee65d I changed the call to fold_non_dependent_expr in check_narrowing to maybe_constant_value. That was the wrong thing to do as these tests show: check_narrowing bails out for dependent expressions but we can still ha

[PATCH] c++: Fix ICE with template codes in check_narrowing [PR91465]

2020-02-06 Thread Marek Polacek
In ed4f2c001a883b2456fc607a33f1c59f9c4ee65d I changed the call to fold_non_dependent_expr in check_narrowing to maybe_constant_value. That was the wrong thing to do as these tests show: check_narrowing bails out for dependent expressions but we can still have template codes like CAST_EXPR that don'