Hi Paul, Bison no longer compiles cleanly (i.e., many warnings) on macOS with GCC 7, 8, 9. Clang is ok though. And there are similar failures on the CI with older versions of GCC.
https://travis-ci.org/akimd/bison/builds/599470491 In file included from /Users/akim/src/gnu/bison/src/parse-gram.c:116: /Users/akim/src/gnu/bison/src/parse-gram.c: In function 'handle_require': /Users/akim/src/gnu/bison/lib/intprops.h:57:55: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] 57 | #define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) | ^ /Users/akim/src/gnu/bison/lib/intprops.h:570:10: note: in expansion of macro 'EXPR_SIGNED' 570 | ? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \ | ^~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:512:4: note: in expansion of macro '_GL_INT_MULTIPLY_RANGE_OVERFLOW' 512 | (overflow (a, b, tmin, tmax) \ | ^~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:481:10: note: in expansion of macro '_GL_INT_OP_CALC' 481 | : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ | ^~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:394:4: note: in expansion of macro '_GL_INT_OP_WRAPV' 394 | _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW) | ^~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/src/parse-gram.c:2999:10: note: in expansion of macro 'INT_MULTIPLY_WRAPV' 2999 | || INT_MULTIPLY_WRAPV (major, 100, &required_version) | ^~~~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:57:55: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] 57 | #define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) | ^ /Users/akim/src/gnu/bison/lib/intprops.h:570:10: note: in expansion of macro 'EXPR_SIGNED' 570 | ? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \ | ^~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:512:4: note: in expansion of macro '_GL_INT_MULTIPLY_RANGE_OVERFLOW' 512 | (overflow (a, b, tmin, tmax) \ | ^~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:490:11: note: in expansion of macro '_GL_INT_OP_CALC' 490 | : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ | ^~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:483:7: note: in expansion of macro '_GL_INT_OP_WRAPV_LONGISH' 483 | : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) | ^~~~~~~~~~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:394:4: note: in expansion of macro '_GL_INT_OP_WRAPV' 394 | _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW) | ^~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/src/parse-gram.c:2999:10: note: in expansion of macro 'INT_MULTIPLY_WRAPV' 2999 | || INT_MULTIPLY_WRAPV (major, 100, &required_version) | ^~~~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:57:55: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] 57 | #define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) | ^ /Users/akim/src/gnu/bison/lib/intprops.h:570:10: note: in expansion of macro 'EXPR_SIGNED' 570 | ? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \ | ^~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:512:4: note: in expansion of macro '_GL_INT_MULTIPLY_RANGE_OVERFLOW' 512 | (overflow (a, b, tmin, tmax) \ | ^~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:495:11: note: in expansion of macro '_GL_INT_OP_CALC' 495 | : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ | ^~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:483:7: note: in expansion of macro '_GL_INT_OP_WRAPV_LONGISH' 483 | : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) | ^~~~~~~~~~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:394:4: note: in expansion of macro '_GL_INT_OP_WRAPV' 394 | _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW) | ^~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/src/parse-gram.c:2999:10: note: in expansion of macro 'INT_MULTIPLY_WRAPV' 2999 | || INT_MULTIPLY_WRAPV (major, 100, &required_version) | ^~~~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:543:67: error: comparison is always false due to limited range of data type [-Werror=type-limits] 543 | ? ((EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \ | ^ /Users/akim/src/gnu/bison/lib/intprops.h:512:4: note: in expansion of macro '_GL_INT_ADD_RANGE_OVERFLOW' 512 | (overflow (a, b, tmin, tmax) \ | ^~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:488:11: note: in expansion of macro '_GL_INT_OP_CALC' 488 | ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ | ^~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:483:7: note: in expansion of macro '_GL_INT_OP_WRAPV_LONGISH' 483 | : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) | ^~~~~~~~~~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:381:4: note: in expansion of macro '_GL_INT_OP_WRAPV' 381 | _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW) | ^~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/src/parse-gram.c:3000:10: note: in expansion of macro 'INT_ADD_WRAPV' 3000 | || INT_ADD_WRAPV (minor, required_version, &required_version)) | ^~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:552:59: error: comparison is always false due to limited range of data type [-Werror=type-limits] 552 | || ((EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \ | ^ /Users/akim/src/gnu/bison/lib/intprops.h:512:4: note: in expansion of macro '_GL_INT_ADD_RANGE_OVERFLOW' 512 | (overflow (a, b, tmin, tmax) \ | ^~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:488:11: note: in expansion of macro '_GL_INT_OP_CALC' 488 | ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ | ^~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:483:7: note: in expansion of macro '_GL_INT_OP_WRAPV_LONGISH' 483 | : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) | ^~~~~~~~~~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:381:4: note: in expansion of macro '_GL_INT_OP_WRAPV' 381 | _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW) | ^~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/src/parse-gram.c:3000:10: note: in expansion of macro 'INT_ADD_WRAPV' 3000 | || INT_ADD_WRAPV (minor, required_version, &required_version)) | ^~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:554:13: error: comparison is always false due to limited range of data type [-Werror=type-limits] 554 | : (tmax) < (b) || (tmax) - (b) < (a)) | ^ /Users/akim/src/gnu/bison/lib/intprops.h:512:4: note: in expansion of macro '_GL_INT_ADD_RANGE_OVERFLOW' 512 | (overflow (a, b, tmin, tmax) \ | ^~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:488:11: note: in expansion of macro '_GL_INT_OP_CALC' 488 | ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ | ^~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:483:7: note: in expansion of macro '_GL_INT_OP_WRAPV_LONGISH' 483 | : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) | ^~~~~~~~~~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:381:4: note: in expansion of macro '_GL_INT_OP_WRAPV' 381 | _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW) | ^~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/src/parse-gram.c:3000:10: note: in expansion of macro 'INT_ADD_WRAPV' 3000 | || INT_ADD_WRAPV (minor, required_version, &required_version)) | ^~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:543:67: error: comparison is always false due to limited range of data type [-Werror=type-limits] 543 | ? ((EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \ | ^ /Users/akim/src/gnu/bison/lib/intprops.h:512:4: note: in expansion of macro '_GL_INT_ADD_RANGE_OVERFLOW' 512 | (overflow (a, b, tmin, tmax) \ | ^~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:493:11: note: in expansion of macro '_GL_INT_OP_CALC' 493 | ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ | ^~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:483:7: note: in expansion of macro '_GL_INT_OP_WRAPV_LONGISH' 483 | : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) | ^~~~~~~~~~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:381:4: note: in expansion of macro '_GL_INT_OP_WRAPV' 381 | _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW) | ^~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/src/parse-gram.c:3000:10: note: in expansion of macro 'INT_ADD_WRAPV' 3000 | || INT_ADD_WRAPV (minor, required_version, &required_version)) | ^~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:552:59: error: comparison is always false due to limited range of data type [-Werror=type-limits] 552 | || ((EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \ | ^ /Users/akim/src/gnu/bison/lib/intprops.h:512:4: note: in expansion of macro '_GL_INT_ADD_RANGE_OVERFLOW' 512 | (overflow (a, b, tmin, tmax) \ | ^~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:493:11: note: in expansion of macro '_GL_INT_OP_CALC' 493 | ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ | ^~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:483:7: note: in expansion of macro '_GL_INT_OP_WRAPV_LONGISH' 483 | : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) | ^~~~~~~~~~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:381:4: note: in expansion of macro '_GL_INT_OP_WRAPV' 381 | _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW) | ^~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/src/parse-gram.c:3000:10: note: in expansion of macro 'INT_ADD_WRAPV' 3000 | || INT_ADD_WRAPV (minor, required_version, &required_version)) | ^~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:554:13: error: comparison is always false due to limited range of data type [-Werror=type-limits] 554 | : (tmax) < (b) || (tmax) - (b) < (a)) | ^ /Users/akim/src/gnu/bison/lib/intprops.h:512:4: note: in expansion of macro '_GL_INT_ADD_RANGE_OVERFLOW' 512 | (overflow (a, b, tmin, tmax) \ | ^~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:493:11: note: in expansion of macro '_GL_INT_OP_CALC' 493 | ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ | ^~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:483:7: note: in expansion of macro '_GL_INT_OP_WRAPV_LONGISH' 483 | : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) | ^~~~~~~~~~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/lib/intprops.h:381:4: note: in expansion of macro '_GL_INT_OP_WRAPV' 381 | _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW) | ^~~~~~~~~~~~~~~~ /Users/akim/src/gnu/bison/src/parse-gram.c:3000:10: note: in expansion of macro 'INT_ADD_WRAPV' 3000 | || INT_ADD_WRAPV (minor, required_version, &required_version)) | ^~~~~~~~~~~~~ cc1: all warnings being treated as errors gmake[2]: *** [Makefile:7046: src/bison-parse-gram.o] Error 1 gmake[2]: Leaving directory '/Users/akim/src/_build/gnu/bison/9d' gmake[1]: *** [Makefile:8095: all-recursive] Error 1 gmake[1]: Leaving directory '/Users/akim/src/_build/gnu/bison/9d' gmake: *** [Makefile:3208: all] Error 2 Compilation FAILED: /Users/akim/src/gnu/bison: build-for-darwin exit 2
