https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119011
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Alejandro Colomar from comment #3) > unsigned long == -1 does The Right Thing(tm). The -1 is first > sign-extended, and afterwards converted, which is what programmers want. No, it is exactly something the warning should warn about. If you want to compare against all ones time_t, just use ~(time_t)0 or similar.