test-intprops: disable -Wtype-limits diagnostics
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 24 May 2011 23:47:01 +0000 (16:47 -0700)
committerIan Beckwith <ianb@erislabs.net>
Thu, 9 Jun 2011 18:59:51 +0000 (19:59 +0100)
* 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
<http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00528.html>.
(cherry picked from commit 9d196fad055a448c5732a8e950cc044b353d2615)

ChangeLog
tests/test-intprops.c

index 15d64f8..a8b7e96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       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
+       <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00528.html>.
+
 2011-05-24  Eric Blake  <eblake@redhat.com>
 
        docs: document recently fixed glibc printf bug
index aae2614..5779482 100644 (file)
 
 /* 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 <config.h>
 
 #include "intprops.h"