Re: [PATCH 1/4] libc/stdlib: Use __builtin_mul_overflow for reallocarray and calloc
Corinna Vinschen via Newlib <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> > --- > 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