Most likely since the c++ delayed folding merge, but I admit I've bootstrapped trunk on i686-linux 8 days ago, so the window is larger, trunk no longer bootstraps on i686-linux: ../../gcc/gimple-fold.c: In function ‘bool gimple_fold_builtin_printf(gimple_stmt_iterator*, tree, tree, built_in_function)’: ../../gcc/gimple-fold.c:2621:30: error: self-comparison always evaluates to true [-Werror=tautological-compare] && (size_t) (int) len == len ^~ This code is not new in there, but supposedly before that we either have not been folding the arguments for -Wtautological-compare, or not so aggressively. I'd say it is quite common idiom to cast a variable to some other type and compare to itself, with the intent that if the type is the same, it is a no-op check, but if the type is narrower or has different signedness, it filters out some undesirable values.
Note one even can't work around this warning through say: && (sizeof (int) >= sizeof (size_t) ? 1 : (size_t) (int) len == len)
Author: jason Date: Sat Nov 14 18:54:16 2015 New Revision: 230382 URL: https://gcc.gnu.org/viewcvs?rev=230382&root=gcc&view=rev Log: PR bootstrap/68346 * call.c (build_new_op_1): Don't fold arguments to warn_tautological_cmp. Added: trunk/gcc/testsuite/g++.dg/warn/Wtautological-compare.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/call.c
Fixed.
Still fails on aarch64 as of r230393. ../../gcc/builtins.c:1101:46: error: self-comparison always evaluates to false [-Werror=tautological-compare] if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM ^~
Author: jason Date: Tue Nov 17 18:16:35 2015 New Revision: 230471 URL: https://gcc.gnu.org/viewcvs?rev=230471&root=gcc&view=rev Log: PR bootstrap/68346 * c-common.c (warn_tautological_cmp): Fold before checking for constants. Added: trunk/gcc/testsuite/g++.dg/warn/Wtautological-compare2.C Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.c
Author: jason Date: Tue Nov 17 21:49:23 2015 New Revision: 230508 URL: https://gcc.gnu.org/viewcvs?rev=230508&root=gcc&view=rev Log: PR bootstrap/68346 * typeck.c (build_static_cast_1): Force a NOP when converting to the same type. Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/typeck.c
Assuming fixed.