https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116378
--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #7) > For glibc (even though the Linux kernel might have a different mode_t idea, > some targets are unsigned short, e.g. arm-linux-eabi) is always: > #define __MODE_T_TYPE __U32_TYPE ah.. I should have added the notes to the c&p /src-local/..../m2/mc-boot-ch/Glibc.c:352:16: note: (so you should pass ‘int’ not ‘mode_t’ {aka ‘short unsigned int’} to ‘va_arg’) /src-local/...../m2/mc-boot-ch/Glibc.c:352:16: note: if this code is reached, the program will abort So the diagnostics tell us exactly what to expect - and it seems from Andrew's comments that this is generic.