https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101211
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #5)
> (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.
Which you already fixed:
commit 4c49accf8997da21be19be0396b2a88f33b9f949
Author: Christophe Lyon
Date: Mon Sep 21 15:22:30 2020 +0000
libc/include/math.h: Remove parameter name
As discussed in GCC bug 97088
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in
prototypes of library functions should use reserved names, or no name
at all.
> > /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);
That was fixed in newlib a few months ago as well:
commit 615cf4bdce0de86e57bdc27e008a35dd713e483f
Author: Torbjörn SVENSSON
Date: Thu Oct 1 12:44:43 2020 +0200
libc/include/inttypes.h: Remove parameter name
As discussed in GCC bug 97088
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in
prototypes of library functions should use reserved names, or no name
at all.