building ecl with gcc-15 / c23 C standard
Dima Pasechnik <[email protected]> Mon, 21 Apr 2025 11:10:57 -0500
| Newsgroups | gmane.lisp.ecl.general |
|---|---|
| Message-ID | <CAAWYfq0+oLNcbd_3=WUOUNsB5Seiit3J-DHSTZPy1iTq_ZX29A@mail.gmail.com> |
--000000000000cd0ace06334c1fbf
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
I had a go at building ecl with C compiler using c23 mode (i.e. -std=3Dc23
argument in CFLAGS)
and apart from an easy to fix "typedef bool" issue, there is more, and
quite hard to understand:
CFLAGS=3D"-std=3Dc23" ./configure && make
[...]
dpp: /home/dima/software/ecl/src/c/read.d ->
read.o.c[...]/home/dima/software/ecl/src/c/read.d: In function
=E2=80=98init_read=E2=80=99:/home/dima/software/ecl/src/c/read.d:2023:39: e=
rror:
passing argument 1 of =E2=80=98ecl_make_cfun=E2=80=99 from incompatible poi=
nter type
[-Wincompatible-pointer-types] 2023 | #define make_cf3(f)
ecl_make_cfun((f), ECL_NIL, NULL, 3) |
^~~ | | |
union cl_lispunion * (*)(union
cl_lispunion *, union cl_lispunion
*)/home/dima/software/ecl/src/c/read.d:2047:29: note: in expansion of
macro =E2=80=98make_cf2=E2=80=99 2047 | | =
^ In
file included from /home/dima/software/ecl/build/ecl/ecl.h:82,
from /home/dima/software/ecl/src/c/read.d:16:/home/dima/software/ec=
l/build/ecl/external.h:427:58:
note: expected =E2=80=98cl_objectfn_fixed=E2=80=99 {aka =E2=80=98union cl_l=
ispunion *
(*)(void)=E2=80=99} but argument is of type =E2=80=98union cl_lispunion * (=
*)(union
cl_lispunion *, union cl_lispunion *)=E2=80=99 427 | extern ECL_API cl_obj=
ect
ecl_make_cfun(cl_objectfn_fixed c_function, cl_object name, cl_object
block, int narg); |
~~~~~~~~~~~~~~~~~~^~~~~~~~~~
see
https://gitlab.com/embeddable-common-lisp/ecl/-/issues/775
Any ideas how to fix this?
Dima
--000000000000cd0ace06334c1fbf
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>I had a go at building ecl with C compiler using c23 =
mode (i.e. -std=3Dc23 argument in CFLAGS)</div><div>and apart from an easy =
to fix "typedef bool" issue, there is more, and quite hard to und=
erstand:</div><div><pre lang=3D"plaintext">CFLAGS=3D"-std=3Dc23" =
./configure && make</pre><pre lang=3D"plaintext"><span>[...]<br>dpp=
: /home/dima/software/ecl/src/c/read.d -> read.o.c</span>
<span>[...]</span>
<span>/home/dima/software/ecl/src/c/read.d: In function =E2=80=98init_read=
=E2=80=99:</span>
<span>/home/dima/software/ecl/src/c/read.d:2023:39: error: passing argument=
1 of =E2=80=98ecl_make_cfun=E2=80=99 from incompatible pointer type [-Winc=
ompatible-pointer-types]</span>
<span> 2023 | #define make_cf3(f) ecl_make_cfun((f), ECL_NIL, NULL, 3)<=
/span>
<span> | ^~~</span>
<span> | |</span>
<span> | union cl_lispunion * (*=
)(union cl_lispunion *, union cl_lispunion *)</span>
<span>/home/dima/software/ecl/src/c/read.d:2047:29: note: in expansion of m=
acro =E2=80=98make_cf2=E2=80=99</span>
<span> 2047 | </span>
<span> | ^ </span>
<span>In file included from /home/dima/software/ecl/build/ecl/ecl.h:82,</sp=
an>
<span> from /home/dima/software/ecl/src/c/read.d:16:</span>
<span>/home/dima/software/ecl/build/ecl/external.h:427:58: note: expected =
=E2=80=98cl_objectfn_fixed=E2=80=99 {aka =E2=80=98union cl_lispunion * (*)(=
void)=E2=80=99} but argument is of type =E2=80=98union cl_lispunion * (*)(u=
nion cl_lispunion *, union cl_lispunion *)=E2=80=99</span>
<span> 427 | extern ECL_API cl_object ecl_make_cfun(cl_objectfn_fixed c_fu=
nction, cl_object name, cl_object block, int narg);</span>
<span> | ~~~~~~~~~~~~~~~~~~^~~~=
~~~~~~</span>
</pre></div><div><br></div><div>see <br></div><div><a href=3D"https://gitla=
b.com/embeddable-common-lisp/ecl/-/issues/775" target=3D"_blank">https://gi=
tlab.com/embeddable-common-lisp/ecl/-/issues/775</a></div><div><br></div><d=
iv>Any ideas how to fix this?</div><div><br></div><div>Dima</div><br></div>
--000000000000cd0ace06334c1fbf--