c++: Fix -Wtype-limits in templates.
When instantiating a template tsubst_copy_and_build suppresses -Wtype-limits warnings about e.g. == always being false because it might not always be false for an instantiation with other template arguments. But we should warn if the operands don't depend on template arguments. PR c++/82521 * pt.c (tsubst_copy_and_build) [EQ_EXPR]: Only suppress warnings if the expression was dependent before substitution.
Showing
gcc/testsuite/g++.dg/warn/Wtype-limits3.C
0 → 100644
Please
register
or
sign in
to comment