From: Paul Eggert Date: Tue, 24 May 2011 23:47:01 +0000 (-0700) Subject: test-intprops: disable -Wtype-limits diagnostics X-Git-Tag: stable/20110609~61 X-Git-Url: http://erislabs.net/gitweb/?p=gnulib.git;a=commitdiff_plain;h=a3a87d2cbbd9c22ccc9d722b6d950f8bc62f3185 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 . (cherry picked from commit 9d196fad055a448c5732a8e950cc044b353d2615) --- diff --git a/ChangeLog b/ChangeLog index 15d64f8d9..a8b7e96ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +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 + . + 2011-05-24 Eric Blake docs: document recently fixed glibc printf bug diff --git a/tests/test-intprops.c b/tests/test-intprops.c index aae261432..577948274 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"