diff options
Diffstat (limited to 'gl/intprops-internal.h')
-rw-r--r-- | gl/intprops-internal.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gl/intprops-internal.h b/gl/intprops-internal.h index 0467a9c..b5ba8d7 100644 --- a/gl/intprops-internal.h +++ b/gl/intprops-internal.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* intprops-internal.h -- properties of integer types not visible to users | 1 | /* intprops-internal.h -- properties of integer types not visible to users |
2 | 2 | ||
3 | Copyright (C) 2001-2023 Free Software Foundation, Inc. | 3 | Copyright (C) 2001-2024 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This program is free software: you can redistribute it and/or modify it | 5 | This program is free software: you can redistribute it and/or modify it |
6 | under the terms of the GNU Lesser General Public License as published | 6 | under the terms of the GNU Lesser General Public License as published |
@@ -20,6 +20,11 @@ | |||
20 | 20 | ||
21 | #include <limits.h> | 21 | #include <limits.h> |
22 | 22 | ||
23 | /* Pacify GCC 13.2 in some calls to _GL_EXPR_SIGNED. */ | ||
24 | #if defined __GNUC__ && 4 < __GNUC__ + (3 <= __GNUC_MINOR__) | ||
25 | # pragma GCC diagnostic ignored "-Wtype-limits" | ||
26 | #endif | ||
27 | |||
23 | /* Return a value with the common real type of E and V and the value of V. | 28 | /* Return a value with the common real type of E and V and the value of V. |
24 | Do not evaluate E. */ | 29 | Do not evaluate E. */ |
25 | #define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v)) | 30 | #define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v)) |
@@ -164,7 +169,9 @@ | |||
164 | /* Work around GCC bug 91450. */ | 169 | /* Work around GCC bug 91450. */ |
165 | # define _GL_INT_MULTIPLY_WRAPV(a, b, r) \ | 170 | # define _GL_INT_MULTIPLY_WRAPV(a, b, r) \ |
166 | ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && _GL_EXPR_SIGNED (a) && _GL_EXPR_SIGNED (b) \ | 171 | ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && _GL_EXPR_SIGNED (a) && _GL_EXPR_SIGNED (b) \ |
167 | && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \ | 172 | && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, \ |
173 | (__typeof__ (*(r))) 0, \ | ||
174 | (__typeof__ (*(r))) -1)) \ | ||
168 | ? ((void) __builtin_mul_overflow (a, b, r), 1) \ | 175 | ? ((void) __builtin_mul_overflow (a, b, r), 1) \ |
169 | : __builtin_mul_overflow (a, b, r)) | 176 | : __builtin_mul_overflow (a, b, r)) |
170 | # endif | 177 | # endif |