Bug #12705
closedremove __builtin_alloca() declaration from string.h
100%
Updated by John Levon about 2 years ago
With GCC9, compiling some of ON gives:
libucb: mismatch in argument 1 type of built-in function '__builtin_alloca'; expected 'unsigned int'
The problem is that "size_t" for 32-bit C in ucbhead/sys/types.h is defined as "ulong_t". This doesn't occur in other situations.
As the extern declaration of the builtin is completely unecessary under GCC 4 onwards at least, the simplest solution is to remove it from string.h
Updated by Toomas Soome about 2 years ago
John Levon wrote:
With GCC9, compiling some of ON gives:
[...]
The problem is that "size_t" for 32-bit C in ucbhead/sys/types.h is defined as "ulong_t". This doesn't occur in other situations.
As the extern declaration of the builtin is completely unecessary under GCC 4 onwards at least, the simplest solution is to remove it from string.h
The issue is reported for: libucb, libtermcap, libdbm, libcurses, librpcsoc and vipw.
Updated by John Levon about 2 years ago
I spot tested this under GCC4, 7, and 9, as well doing a nightly on a system installed with this new string.h
Updated by Electric Monk about 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit c8907381b10259bed3a871a2881c0f3b7287ab3c
commit c8907381b10259bed3a871a2881c0f3b7287ab3c Author: John Levon <john.levon@joyent.com> Date: 2020-05-11T16:21:08.000Z 12705 remove __builtin_alloca() declaration from string.h Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Approved by: Gordon Ross <gordon.w.ross@gmail.com>