[PATCH 1/4] libc/stdlib: Use __builtin_mul_overflow for reallocarray and calloc
Corinna Vinschen
vinschen@redhat.com
Wed Aug 12 08:13:20 GMT 2020
On Aug 11 16:05, Keith Packard via Newlib wrote:
> This built-in function (available in both gcc and clang) is more
> efficient and generates shorter code than open-coding the test.
>
> Signed-off-by: Keith Packard <keithp@keithp.com>
> ---
> newlib/libc/stdlib/mallocr.c | 8 +++++++-
> newlib/libc/stdlib/nano-mallocr.c | 12 ++++++++++--
> newlib/libc/stdlib/reallocarray.c | 17 +++++------------
> 3 files changed, 22 insertions(+), 15 deletions(-)
Pushed.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
More information about the Newlib
mailing list