https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101211
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Christophe Lyon from comment #4) > It works for aarch64-linux-gnu, but fails for aarch64-elf (with newlib): > FAIL: 17_intro/names.cc (test for excess errors) > Excess errors: > /aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64-none-elf/include/math.h:194: > error: expected ')' before ';' token > /aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64-none-elf/include/math.h:195: > error: expected ')' before ';' token > /aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64-none-elf/include/math.h:196: > error: expected ')' before ';' token > /aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64-none-elf/include/math.h:197: > error: expected ')' before ';' token > /aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64-none-elf/include/math.h:198: > error: expected ')' before ';' token > /aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64-none-elf/include/math.h:199: > error: expected ')' before ';' token > /aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64-none-elf/include/math.h:200: > error: expected ')' before ';' token > /aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64-none-elf/include/math.h:201: > error: expected ')' before ';' token I think that's due to bugs in newlib's <math.h> on these lines: extern int __isinff (float x); extern int __isinfd (double x); extern int __isnanf (float x); extern int __isnand (double x); extern int __fpclassifyf (float x); extern int __fpclassifyd (double x); extern int __signbitf (float x); extern int __signbitd (double x); Those should use __x not x. > /aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64-none-elf/include/time.h:110: > error: expected unqualified-id before ';' token > /aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64-none-elf/include/time.h:110: > error: expected ')' before ';' token Non-reserved names in this newlib type: typedef struct __tzrule_struct { char ch; int m; int n; int d; int s; time_t change; long offset; /* Match type of _timezone. */ } __tzrule_type; I'll have to adjust the test for that. > /aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64-none-elf/include/inttypes.h: > 323: error: expected ')' before ';' token This is a newlib bug: extern intmax_t imaxabs(intmax_t j); It should be using __j here, and similarly for the next line: extern imaxdiv_t imaxdiv(intmax_t numer, intmax_t denomer);