[PATCH 0/6] Fixes inspired by building with clang
Keith Packard via Newlib <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
I had a picolibc user building the library with clang and they reported a number of warnings. I also have another minor nano-mallocr patch in this series. * [PATCH 1/6] libm/stdlib: Recover from realloc failure when shrinking Last in my nano-mallocr series -- this has realloc always succeed when shrinking the allocation. * [PATCH 2/6] libc/iconv: Check ces handlers table value in This catches a failure which would otherwise be missed causing crashes later on. * [PATCH 3/6] Avoid implicit floating point conversions A large-ish patch that fixes warnings generated by clang's -Wdouble-promotion flag. Fixing these will avoid accidentally using double-precision computations, which can be expensive on machines without hardware double support. * [PATCH 4/6] libc/stdlib: Undefined shift negative value in a64l This code was using undefined behaviour from the compiler. As GCC and clang both continue to 'improve', it's good to keep undefined behaviour out of code. * [PATCH 5/6] libc/stdlib: Clean up clang warnings * [PATCH 6/6] libc/stdio: Conditionally declare vars for These just fix some warnings generated when compiling with various configurations using clang. None of these should change the resulting code.