SDL2 libm compiler errors on AIX7.x

Hello,
I was scratching my head on the below weird AIX7.x compile error (using GCC 10.2.0 compiled for AIX7.2 ppc64 big endian)

While building the bundled math libs I encounter this problem with e_fmod.c

CC build/e_fmod.lo
In file included from /usr/include/sys/context.h:32,
from /usr/local/gcc/lib/gcc/powerpc-ibm-aix7.2.5.0/10.2.0/include-fixed/sys/signal.h:37,
from /usr/include/signal.h:34,
from include/SDL_assert.h:61,
from /usr/src/SDL2-2.0.14/src/libm/…/SDL_internal.h:119,
from /usr/src/SDL2-2.0.14/src/libm/math_libm.h:25,
from /usr/src/SDL2-2.0.14/src/libm/e_fmod.c:18:
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c: In function ‘SDL_uclibc_fmod’:
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:25:18: error: expected identifier or ‘(’ before numeric constant
25 | int32_t n,hx,hy,hz,ix,iy,sx,i;
| ^~
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:30:2: error: ‘sx’ undeclared (first use in this function); did you mean ‘lx’?
30 | sx = hx&0x80000000; /* sign of x /
| ^~
| lx
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:30:2: note: each undeclared identifier is reported only once for each function it appears in
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:47:8: error: ‘ix’ undeclared (first use in this function); did you mean ‘lx’?
47 | for (ix = -1043, i=lx; i>0; i<<=1) ix -=1;
| ^~
| lx
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:47:20: error: ‘i’ undeclared (first use in this function)
47 | for (ix = -1043, i=lx; i>0; i<<=1) ix -=1;
| ^
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:47:18: warning: left-hand operand of comma expression has no effect [-Wunused-value]
47 | for (ix = -1043, i=lx; i>0; i<<=1) ix -=1;
| ^
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:49:18: warning: left-hand operand of comma expression has no effect [-Wunused-value]
49 | for (ix = -1022,i=(hx<<11); i>0; i<<=1) ix -=1;
| ^
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:56:8: error: ‘iy’ undeclared (first use in this function); did you mean ‘ly’?
56 | for (iy = -1043, i=ly; i>0; i<<=1) iy -=1;
| ^~
| ly
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:56:18: warning: left-hand operand of comma expression has no effect [-Wunused-value]
56 | for (iy = -1043, i=ly; i>0; i<<=1) iy -=1;
| ^
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:58:18: warning: left-hand operand of comma expression has no effect [-Wunused-value]
58 | for (iy = -1022,i=(hy<<11); i>0; i<<=1) iy -=1;
| ^
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:91:8: error: lvalue required as left operand of assignment
91 | hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
| ^
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:91:38: error: lvalue required as left operand of assignment
91 | hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
| ^~
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:94:17: warning: bitwise comparison always evaluates to false [-Wtautological-compare]
94 | if((hz|lz)==0) /
return sign(x)*0 */
| ^~
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:99:4: error: lvalue required as left operand of assignment
99 | hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
| ^
/usr/src/SDL2-2.0.14/src/libm/e_fmod.c:99:34: error: lvalue required as left operand of assignment
99 | hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
| ^~
gmake: *** [Makefile:359: build/e_fmod.lo] Error 1
root@system:/usr/src/SDL2-2.0.14 #

Im not really sure what this means - again AIX can be a little weird
(other math libs in SDL2 build fine except the k_tan.c)

k_cos.c error is as follows

CC build/k_cos.lo
In file included from /usr/include/sys/context.h:32,
from /usr/local/gcc/lib/gcc/powerpc-ibm-aix7.2.5.0/10.2.0/include-fixed/sys/signal.h:37,
from /usr/include/signal.h:34,
from include/SDL_assert.h:61,
from /usr/src/SDL2-2.0.14/src/libm/…/SDL_internal.h:119,
from /usr/src/SDL2-2.0.14/src/libm/math_libm.h:25,
from /usr/src/SDL2-2.0.14/src/libm/k_cos.c:47:
/usr/src/SDL2-2.0.14/src/libm/k_cos.c: In function ‘__kernel_cos’:
/usr/src/SDL2-2.0.14/src/libm/k_cos.c:61:11: error: expected identifier or ‘(’ before numeric constant
61 | double a,hz,z,r,qx;
| ^~
/usr/src/SDL2-2.0.14/src/libm/k_cos.c:68:2: error: ‘z’ undeclared (first use in this function)
68 | z = xx;
| ^
/usr/src/SDL2-2.0.14/src/libm/k_cos.c:68:2: note: each undeclared identifier is reported only once for each function it appears in
/usr/src/SDL2-2.0.14/src/libm/k_cos.c:69:2: error: ‘r’ undeclared (first use in this function)
69 | r = z
(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*C6)))));
| ^
/usr/src/SDL2-2.0.14/src/libm/k_cos.c:74:3: error: ‘qx’ undeclared (first use in this function); did you mean ‘ix’?
74 | qx = 0.28125;
| ^~
| ix
/usr/src/SDL2-2.0.14/src/libm/k_cos.c:82:1: warning: control reaches end of non-void function [-Wreturn-type]
82 | }
| ^
gmake: *** [Makefile:377: build/k_cos.lo] Error 1