Paul Eggert wrote: > On 10/22/10 12:23, Jim Meyering wrote: > >> anytostr.c:34: error: comparison of unsigned expression < 0 is always >> false [-Wtype-limits] > > Hmm, I could have sworn I tested that with -Wtype-limits and it worked > for me, but evidently I messed up (or perhaps I used a compiler that > is not as stupid as GCC :-). Anyway, thanks for catching > that and I reverted the change. > > I avoid -Wtype-limits since in my experience it causes more trouble > (harder-to-read and not-always-compiled and therefore buggier code) > than it cures (careless coding errors).
Toeing the line in this case is counterproductive. How about sticking with your improvement and instead using this pragma in that file? # pragma GCC diagnostic ignored "-Wtype-limits"