Re: [PATCH v2] newlib: fix build with <gcc-5 versions
Corinna Vinschen <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On Mar 18 09:30, R. Diez via Newlib wrote: > > > > It's not just about old GCC, it's about any C compiler that doesn't have > > > that builtin. > > > > Well, I guess, GTG then. > > > Let's see if I understand the situation: > > You are committing a replacement implementation of __builtin_mul_overflow() for older GCC versions and for any other compiler which does not have it. > > The only significant extra feature about that function is the detection of integer overflow. > > The implementation lives in libc/include/sys/cdefs.h , so it is > accessible not just by some special malloc code which should never > overflow because targets wouldn't have that much memory or whatever. > > The replacement implementation is known to be broken and therefore poses a risk on anybody relying on the original, documented behaviour. > > There are no mitigation measures. There is not even a comment next to the replacement implementation that states it is broken. > > And you guys are fine with that. > > Is that correct? I'm open to a better or followup patch. Corinna