On 03/10/15 08:39, Paul Eggert wrote: > Pádraig Brady wrote: >> xalloc is >> included into the coreutils compilation units and so >> needs this guard. > > That's a problem in coreutils, not in gnulib.
Right. I missed the fact it applied only to a single use of xnrealloc. > Please don't give much weight to > those particular compiler warnings. They're often false alarms, as these > were. > There is nothing wrong when a compiler can reason about integer overflow to > generate better code. Agreed. I was just ensuring the 32 bit dev build succeeded, so that automated tests would run. > Conversely, it is often helpful for an application to use > signed integer types so that a checking implementation can report integer > overflow when the appliction is buggy, which means we shouldn't blindly > substitute unsigned for signed types merely to stop GCC from bleating in this > way. Right, if adding explicit checks at runtime, with your macros for example: http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00264.html > I reverted the gnulib change, and installed the attached coreutils patches to > pacify 32-bit GCC in a better way. If these sorts of warnings continue to be > a > hassle in coreutils, perhaps we should disable the warnings there too. Ah! I didn't know about assume(), as it wasn't used in coreutils. http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=28df8b1e I was considering IF_LINT(assert(...)); but thought that too ugly. A much better solution. thanks! Pádraig.
