tkchia / newlib-ia16

Fork of IA-16 port of Newlib -- added small and medium model support
GNU General Public License v2.0
13 stars 4 forks source link

%zu not supported in printf() #15

Closed cspiegel closed 3 years ago

cspiegel commented 3 years ago

The %zu specifier (introduced in C99) is not supported. The following:

#include <stdio.h>

int main(void)
{
    printf("%zu\n", (size_t)0);

    return 0;
}

just results in zu being printed.

I'm not sure if this is a gcc or newlib issue: it happens if I use __builtin_printf directly, but also happens if I pass -fno-builtin-printf to gcc.

This is from build-ia16 20201106.

tkchia commented 3 years ago

Hello @cspiegel,

I have uploaded an updated pre-compiled DJGPP-hosted toolchain (20210305). This update should resolve this issue and your previous issue (https://github.com/tkchia/newlib-ia16/issues/14).

Thank you!