X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fanytostr.c;h=5582eb1b92cde55232710d3ae49d87afc0d68063;hb=3a0f424eeb37dc777d52179e20c9889f3350f2ad;hp=a64011f5eea6c610299df9f7db1f916fa14f3789;hpb=ba6c03ba1a75ab19506e823d7a1d2f7daa70821b;p=gnulib.git diff --git a/lib/anytostr.c b/lib/anytostr.c index a64011f5e..5582eb1b9 100644 --- a/lib/anytostr.c +++ b/lib/anytostr.c @@ -1,6 +1,6 @@ /* anytostr.c -- convert integers to printable strings - Copyright (C) 2001, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2001, 2006, 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,6 +17,11 @@ /* Written by Paul Eggert */ +/* Tell gcc not to warn about the (i < 0) test, below. */ +#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wtype-limits" +#endif + #include #include "inttostr.h" @@ -31,7 +36,7 @@ anytostr (inttype i, char *buf) char *p = buf + INT_STRLEN_BOUND (inttype); *p = 0; - if (TYPE_SIGNED (inttype) && i < 0) + if (i < 0) { do *--p = '0' - i % 10;