Mercurial > hg > octave-nkf > gnulib-hg
changeset 14825:82b7de24fe12
test-intprops: disable -Wtype-limits diagnostics
* tests/test-intprops.c: Use a pragma to ignore -Wtype-limits
diagnostics. Otherwise, the integer overflow macros generate many
diagnostics. Reported by Jim Meyering in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00528.html>.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 24 May 2011 16:47:01 -0700 |
parents | 10982c2d5cdb |
children | a57aca916cfd |
files | ChangeLog tests/test-intprops.c |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2011-05-24 Paul Eggert <eggert@cs.ucla.edu> + test-intprops: disable -Wtype-limits diagnostics + * tests/test-intprops.c: Use a pragma to ignore -Wtype-limits + diagnostics. Otherwise, the integer overflow macros generate many + diagnostics. Reported by Jim Meyering in + <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00528.html>. + intprops: shorten, to pacify gcc -Woverlength-strings * lib/intprops.h (_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT): (_GL_BINARY_OP_OVERFLOW): Say "0 * (x)" rather than "(x) - (x)",
--- a/tests/test-intprops.c +++ b/tests/test-intprops.c @@ -16,6 +16,12 @@ /* 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__ +# pragma GCC diagnostic ignored "-Wtype-limits" +#endif + #include <config.h> #include "intprops.h"