From: Paul Eggert Date: Tue, 24 May 2011 23:47:01 +0000 (-0700) Subject: test-intprops: disable -Wtype-limits diagnostics X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d196fad055a448c5732a8e950cc044b353d2615;p=pspp test-intprops: disable -Wtype-limits diagnostics * tests/test-intprops.c: Use a pragma to ignore -Wtype-limits diagnostics. Otherwise, the integer overflow macros generate many diagnostics. Reported by Jim Meyering in . --- diff --git a/ChangeLog b/ChangeLog index fee8b5ad31..390d4e808d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2011-05-24 Paul Eggert + test-intprops: disable -Wtype-limits diagnostics + * tests/test-intprops.c: Use a pragma to ignore -Wtype-limits + diagnostics. Otherwise, the integer overflow macros generate many + diagnostics. Reported by Jim Meyering in + . + intprops: shorten, to pacify gcc -Woverlength-strings * lib/intprops.h (_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT): (_GL_BINARY_OP_OVERFLOW): Say "0 * (x)" rather than "(x) - (x)", diff --git a/tests/test-intprops.c b/tests/test-intprops.c index 8fc582b90f..1a34d77bf5 100644 --- a/tests/test-intprops.c +++ b/tests/test-intprops.c @@ -16,6 +16,12 @@ /* Written by Paul Eggert. */ +/* Tell gcc not to warn about the many (X < 0) expressions that + the overflow macros expand to. */ +#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wtype-limits" +#endif + #include #include "intprops.h"