Hi, a while ago the number of warnings / notes when compiling gnulib modules increased to an extend, that it is hardly possible to check/lint for C89 compliance.
Background: We try to be compliant to C89 with the GNU Wget project (C header + sources). Each patch is checked by compiling the project with lot's of gcc's warnings turned on, together with -std=c89. To provide the compiler flags, CFLAGS environment variable is used. Especially -Wlong-long and -pedantic floods the screen with warnings and notes from gnulib modules. Finding any warnings emanated by Wget sources becomes very tedious. Some example output below. What do you suggest to avoid the verbose output from gnulib modules ? Example output: ######################################### In file included from ../lib/xalloc.h:23:0, from wget.h:214, from http-ntlm.c:32: ../lib/xalloc.h: In function 'xnmalloc': ../lib/xalloc-oversized.h:41:5: warning: ISO C forbids braced-groups within expressions [-Wpedantic] ({ size_t __xalloc_size; __builtin_mul_overflow (n, s, &__xalloc_size); }) ^ ../lib/xalloc.h:106:7: note: in expansion of macro 'xalloc_oversized' if (xalloc_oversized (n, s)) ^ ../lib/xalloc.h: In function 'xnrealloc': ../lib/xalloc-oversized.h:41:5: warning: ISO C forbids braced-groups within expressions [-Wpedantic] ({ size_t __xalloc_size; __builtin_mul_overflow (n, s, &__xalloc_size); }) ^ ../lib/xalloc.h:119:7: note: in expansion of macro 'xalloc_oversized' if (xalloc_oversized (n, s)) ######################################### ../lib/intprops.h:85:28: warning: ISO C90 does not support 'long long' [- Wlong-long] verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); ^ ../lib/verify.h:196:58: note: in definition of macro '_GL_VERIFY_TYPE' struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } ^ ../lib/verify.h:211:8: note: in expansion of macro '_GL_VERIFY_TRUE' [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] ^ ../lib/verify.h:251:19: note: in expansion of macro '_GL_VERIFY' #define verify(R) _GL_VERIFY (R, "verify (" #R ")") ^ ../lib/intprops.h:85:1: note: in expansion of macro 'verify' verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); ^ ../lib/intprops.h:85:9: note: in expansion of macro 'TYPE_MAXIMUM' verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); ######################################### Best Regards Tim Rühsen
signature.asc
Description: This is a digitally signed message part.