diffutils-3.5-1.fc26 fails to build with GCC 7: In file included from inttostr.h:23:0, from anytostr.c:29, from imaxtostr.c:3: intprops.h:234:34: error: expected ')' before '(' token __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0) ^ The problem is that intprops.h has /* True if __builtin_add_overflow (A, B, P) works when P is null. */ #define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC) which is now true, and so the following patch is needed to make this compile: --- lib/intprops.h.mp 2017-02-06 13:58:56.544961027 +0100 +++ lib/intprops.h 2017-02-06 14:00:10.704026941 +0100 @@ -230,11 +230,11 @@ verify (TYPE_MAXIMUM (long long int) == (e.g., A and B) have the same type as MIN and MAX. Instead, they assume that the result (e.g., A + B) has that type. */ #if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL -# define _GL_ADD_OVERFLOW(a, b, min, max) +# define _GL_ADD_OVERFLOW(a, b, min, max) \ __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0) -# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) +# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0) -# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) +# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0) #else # define _GL_ADD_OVERFLOW(a, b, min, max) \
Hmm, I also get this after fixing the line continuations: ../lib/intprops.h:234:4: error: expression in static assertion is not constant Might be a gnulib issue.
Maybe already fixed upstream: http://git.savannah.gnu.org/cgit/diffutils.git/log/
*** This bug has been marked as a duplicate of bug 1423328 ***