From a3a87d2cbbd9c22ccc9d722b6d950f8bc62f3185 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 24 May 2011 16:47:01 -0700 Subject: [PATCH] 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) --- ChangeLog | 8 ++++++++ tests/test-intprops.c | 6 ++++++ 2 files changed, 14 insertions(+) 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" -- 2.11.0