]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
iconv: Suppress array out of bounds warning.
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Tue, 27 Jan 2015 08:37:04 +0000 (09:37 +0100)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Tue, 27 Jan 2015 08:37:04 +0000 (09:37 +0100)
ChangeLog
iconv/loop.c

index 588b9ecff131d67008c0b63845386fa1742a7b71..c6227b73c6c0a592b0ee77cc96e613d203e1fa1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+       * iconv/loop.c: Suppress array out of bound warning caused by GCC
+       bug (GCC BZ #64739).
+
 2015-01-25  Andreas Schwab  <schwab@linux-m68k.org>
 
        * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
index 63148e33b4cd51c7be4702bb0c6dec12e408e0e2..48f47620c09a6ce18922a0baed8a5682f1620c51 100644 (file)
@@ -56,7 +56,7 @@
 #include <sys/param.h>         /* For MIN.  */
 #define __need_size_t
 #include <stddef.h>
-
+#include <libc-internal.h>
 
 /* We have to provide support for machines which are not able to handled
    unaligned memory accesses.  Some of the character encodings have
@@ -392,8 +392,14 @@ SINGLE(LOOPFCT) (struct __gconv_step *step,
     {
       *inptrp = inend;
 #  ifdef STORE_REST
+
+      /* Building with -O3 GCC emits a `array subscript is above array
+        bounds' warning.  GCC BZ #64739 has been opened for this.  */
+      DIAG_PUSH_NEEDS_COMMENT;
+      DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Warray-bounds");
       while (inptr < inend)
        bytebuf[inlen++] = *inptr++;
+      DIAG_POP_NEEDS_COMMENT;
 
       inptr = bytebuf;
       inptrp = &inptr;