Pádraig Brady wrote:
test-intprops.c:227:2: error: string length '6275' is greater than the length 
'4095' ISO C99 compilers are required to support [-Werror=overlength-strings]
    CHECK_SUM (-1, LONG_MIN, long int, true, LONG_MAX);

Thanks, I toyed with actually fixing the problem but naaah, it's too much hassle and really, this is just a test program. So I installed the attached workaround instead.
From b6563a1599229165798dca98db56b5b9e3f582c4 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Thu, 5 Nov 2015 07:46:32 -0800
Subject: [PATCH 1/2] intprops-test: suppress -Woverlength-strings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problem reported by Pádraig Brady in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-11/msg00008.html
It is not worth the hassle to port this test to compilers that
cannot handle long strings in diagnostics.
* tests/test-intprops.c [__GNUC__]: Ignore -Woverlength-strings.
---
 ChangeLog             | 9 +++++++++
 tests/test-intprops.c | 7 ++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9502d65..336cd3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-11-05  Paul Eggert  <egg...@cs.ucla.edu>
+
+       intprops-test: suppress -Woverlength-strings
+       Problem reported by Pádraig Brady in:
+       http://lists.gnu.org/archive/html/bug-gnulib/2015-11/msg00008.html
+       It is not worth the hassle to port this test to compilers that
+       cannot handle long strings in diagnostics.
+       * tests/test-intprops.c [__GNUC__]: Ignore -Woverlength-strings.
+
 2015-11-03  Pádraig Brady  <p...@draigbrady.com>
 
        quotearg: add quotearg_n_style_colon()
diff --git a/tests/test-intprops.c b/tests/test-intprops.c
index 007823e..6b11417 100644
--- a/tests/test-intprops.c
+++ b/tests/test-intprops.c
@@ -16,9 +16,10 @@
 
 /* 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__
+/* Tell gcc not to warn about the long expressions that the overflow
+   macros expand to, or about the (X < 0) expressions.  */
+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Woverlength-strings"
 # pragma GCC diagnostic ignored "-Wtype-limits"
 #endif
 
-- 
2.1.0

Reply via email to