This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Add reallocarray function.


On 04/17/2017 07:32 AM, Florian Weimer wrote:
* Dennis Wölfing:

+static inline bool
+check_mul_overflow (size_t l, size_t r, INTERNAL_SIZE_T *result)
+{
+#if __GNUC__ >= 5
+  return __builtin_mul_overflow (l, r, result);
This is not correct for size_t != INTERNAL_SIZE_T.

Why not? Could you give an example?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]