On 3/4/21 9:37 PM, Marek Polacek wrote:
This PR complains that we issue a -Wconversion warning intemplate <int N> struct X {}; template <class T> X<sizeof(T)> foo(); saying "conversion from 'long unsigned int' to 'int' may change value". While it's not technically wrong, I suspect -Wconversion warnings aren't all that useful for value-dependent expressions. So this patch disables them, though I'm open to other ideas.
How about suppressing -Wconversion in build_converted_constant_expr_internal? If the size_t value ended up being too large for the int parameter, we would give an error about overflow in a constant expression, not just a warning.
Jason
