This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix problem with GCC 4.9.1 in string/tester.c


tester.c does not compile on my Xubuntu 14.10 with GCC Ubuntu 4.9.1-16ubuntu6. This patch fixes it. Maybe the Ubuntu folks did backport something.

diff --git a/string/tester.c b/string/tester.c
index f957ed2..445b427 100644
--- a/string/tester.c
+++ b/string/tester.c
@@ -1305,9 +1305,9 @@ test_memset (void)
   equal(one, "axxxefgh", 2);           /* Basic test. */

   DIAG_PUSH_NEEDS_COMMENT;
-#if __GNUC_PREREQ (5, 0)
-  /* GCC 5.0 warns about a zero-length memset because the arguments to memset
-     may be in the wrong order.  But we really want to test this.  */
+#if __GNUC_PREREQ (5, 0) || __GNUC_PREREQ (4, 9)
+  /* GCC 5.0 / 4.9 warns about a zero-length memset because the arguments to
+     memset may be in the wrong order.  But we really want to test this.  */
   DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args")
 #endif
   (void) memset(one+2, 'y', 0);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]