C99 support in Newlib

Andre Vieira (lists) Andre.SimoesDiasVieira@arm.com
Thu Jan 14 14:04:00 GMT 2016


On 11/01/16 14:27, Andre Vieira (lists) wrote:
> On 20/01/15 11:49, Freddie Chopin wrote:
>> On 01/20/2015 12:46 PM, Corinna Vinschen wrote:
>>> On Jan 20 12:21, Freddie Chopin wrote:
>>>> On 01/20/2015 11:06 AM, Corinna Vinschen wrote:
>>>>> On Jan 20 17:19, Joey Ye wrote:
>>>>>> Corinna, May I know which features are missing please?
>>>>> As far as I can tell, mainly the long double functions for targets
>>>>> with sizeof(double) != sizeof(long double).
>>>> I have one more - from my recent browsing of scanf() code, I assume
>>>> that
>>>> "%[...]" is supported, but "%[^...]" is not.
>>> No, it is.  See libc/stdio/sccl.c.
>>
>> Right, my mistake (; Sorry for the noise then (;
>>
>> Regards,
>> FCh
>>
>
> Hi there,
>
> I thought I'd reply to this thread as it is very much related to my issue.
>
> In a recent GCC patch a change to an optimization, which now checks for
> the existence of libc support for C99 functions, lead to a regression
> for arm-none-eabi. This is because currently GCC is set up to assume no
> C99 support is available for arm-none-eabi. As far as I know this is
> because it comes with newlib and as this thread points out it does not
> claim to fully support C99. See
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69227
>
> Hopefully with some help I can figure out what GCC 'function classes'
> can be seen as supported by newlib for arm-none-eabi. These function
> classes are:
>
> function_c94:
>     functions only part of the standard in C94 or above.
> function_c99_misc:
>     functions only part of the standard in C99 or above.
> function_c99_math_complex:
>     math complex functions only part of the standard in C99 or above.
> function_c11_misc:
>     functions only part of the standard in C11 or above
>
> And there is also 'function_sincos' for which I couldn't find a
> definition though I assume its for the GNU extension 'sincos'.
>
> $arm-none-eabi-nm libm.a | grep sincos
> lib_a-w_sincos.o:
> 00000000 T sincos
> lib_a-wf_sincos.o:
> 00000000 T sincosf
>
>
> Can someone confirm the support or lack thereof for these classes in
> newlib for 'arm-none-eabi'.
>
> Thanks!
>
> BR,
> Andre
>

As an investigation exercise I constructed a list of all functions in 
the C99 standard and I checked whether the newlib version we build for 
arm-none-eabi defined these and I found that it was missing quite a lot 
of them! See attached file.

That answers my question for the bugzilla ticket. We can not enable 
function_c99_* function class support for arm-none-eabi.

Cheers,
Andre
-------------- next part --------------
cacosl
casinl
catanl
ccosl
csinl
ctanl
cacoshl
casinhl
catanhl
ccoshl
csinhl
ctanhl
cexpl
clogl
cpowl
csqrtl
cargl
CMPLXL
conjl
cprojl
feclearexcept
fegetexceptflag
feraiseexcept
fesetexceptflag
fetestexcept
imaxabs
imaxdiv
strtoimax
strtoumax
wcstoimax
wcstoumax
isfinite
isnormal
isgreater
isgreaterequal
isless
islessequal
islessgreater
isunordered
atomic_is_lock_free
atomic_fetch_key
freopen_s
printf_s
scanf_s
snprintf_s
sprintf_s
sscanf_s
vprintf_s
vscanf_s
vsnprintf_s
vsprintf_s
vsscanf_s
getenv_s
qsort_s
wctomb_s
memset_s
strerrorlen_s
strnlen_s
call_once
cnd_broadcast
cnd_destroy
cnd_init
cnd_signal
cnd_timedwait
cnd_wait
mtx_init
thrd_create
thrd_exit
thrd_join
thrd_sleep
timespec_get
swprintf_s
swscanf_s
vswscanf_s
vwprintf_s
vwscanf_s
wprintf_s
wscanf_s
wcsnlen_s


More information about the Newlib mailing list