changeset 18121:cbb94bdf8f90

xalloc: do not worry about GCC 5 warning on 32 bit * lib/xalloc.h: Revert previous change. I found a better way to fix this in coreutils.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 03 Oct 2015 00:14:05 -0700
parents 42ade85377b2
children 5c4b27df8518
files ChangeLog lib/xalloc.h
diffstat 2 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 02 20:21:50 2015 +0100
+++ b/ChangeLog	Sat Oct 03 00:14:05 2015 -0700
@@ -1,3 +1,9 @@
+2015-10-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+	xalloc: do not worry about GCC 5 warning on 32 bit
+	* lib/xalloc.h: Revert previous change.
+	I found a better way to fix this in coreutils.
+
 2015-10-02  Pádraig Brady  <P@draigBrady.com>
 
 	xalloc: avoid GCC 5.1 warning on 32 bit
--- a/lib/xalloc.h	Fri Oct 02 20:21:50 2015 +0100
+++ b/lib/xalloc.h	Sat Oct 03 00:14:05 2015 -0700
@@ -94,12 +94,6 @@
 #define XCALLOC(n, t) \
    ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
 
-/* GCC 5.1 gives an erroneous warning on 32 bit for xalloc_oversized():
-   "assuming signed overflow does not occur when simplifying conditional".  */
-#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wstrict-overflow"
-#endif
 
 /* Allocate an array of N objects, each with S bytes of memory,
    dynamically, with error checking.  S must be nonzero.  */
@@ -127,10 +121,6 @@
   return xrealloc (p, n * s);
 }
 
-#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
-# pragma GCC diagnostic pop
-#endif
-
 /* If P is null, allocate a block of at least *PN such objects;
    otherwise, reallocate P so that it contains more than *PN objects
    each of S bytes.  S must be nonzero.  Set *PN to the new number of