# HG changeset patch # User Paul Eggert # Date 1536365639 25200 # Node ID 47cca1921b32573a625ab00044b593f7735934c2 # Parent bce09b317af9b16f66645759f1214f1ad903c7b1 intprops: minor clarification of code * lib/intprops.h (_GL_BINARY_OP_OVERFLOW): Use _GL_INT_CONVERT rather than reinventing it. diff -r bce09b317af9 -r 47cca1921b32 ChangeLog --- a/ChangeLog Fri Sep 07 23:39:37 2018 +0200 +++ b/ChangeLog Fri Sep 07 17:13:59 2018 -0700 @@ -1,3 +1,9 @@ +2018-09-07 Paul Eggert + + intprops: minor clarification of code + * lib/intprops.h (_GL_BINARY_OP_OVERFLOW): + Use _GL_INT_CONVERT rather than reinventing it. + 2018-09-07 Bruno Haible Fix a comment. diff -r bce09b317af9 -r 47cca1921b32 lib/intprops.h --- a/lib/intprops.h Fri Sep 07 23:39:37 2018 +0200 +++ b/lib/intprops.h Fri Sep 07 17:13:59 2018 -0700 @@ -342,8 +342,8 @@ Arguments should be free of side effects. */ #define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \ op_result_overflow (a, b, \ - _GL_INT_MINIMUM ((1 ? 0 : (b)) + (a)), \ - _GL_INT_MAXIMUM ((1 ? 0 : (b)) + (a))) + _GL_INT_MINIMUM (_GL_INT_CONVERT (a, b)), \ + _GL_INT_MAXIMUM (_GL_INT_CONVERT (a, b))) /* Store the low-order bits of A + B, A - B, A * B, respectively, into *R. Return 1 if the result overflows. See above for restrictions. */