[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
io.c incompatible pointer between public.read_func and ssize_t(*)() with
From: |
Jeffrey Cliff |
Subject: |
io.c incompatible pointer between public.read_func and ssize_t(*)() with c23 |
Date: |
Sat, 10 Aug 2024 10:48:53 -0600 |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnm
Compiler: gcc (GCC) 15.0.0 20240509 (experimental)
Compilation CFLAGS: -std=gnu23 -DNDEBUG
uname output: Linux fatima 6.10.3-gnu-c23-qxfixgnm #2 SMP
PREEMPT_DYNAMIC Wed Aug 7 20:46:44 CST 2024 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Gawk Version: 5.3.0*
Attestation 1:
I have read
https://www.gnu.org/software/gawk/manual/html_node/Bugs.html.
Yes
Attestation 2:
I have not modified the sources before building gawk.
True
Description:
compilation fails at io.c:
# gcc -DDEFPATH='".:/usr/local/share/awk"'
-DDEFLIBPATH="\"/usr/local/lib/gawk\"" -DSHLIBEXT="\"so"\"
-DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"/usr/local/share/locale"'
-I"./support" -I. -std=gnu23 -DND\
EBUG -std=gnu23 -DNDEBUG -MT io.o -MD -MP -MF $depbase.Tpo -c -o io.o io.c &&\
mv -f $depbase.Tpo $depbase.Po
io.c: In function 'iop_alloc':
io.c:3389:31: error: assignment to 'ssize_t (*)(int, void *,
size_t)' {aka 'long int (*)(int, void *, long unsigned int)'} from
incompatible pointer type 'ssize_t (*)(void)' {aka 'long int
(*)(void)'}\
[-Wincompatible-pointer-types]
3389 | iop->public.read_func = ( ssize_t(*)() ) read;
| ^
io.c: In function 'get_read_timeout':
io.c:4449:36: warning: comparison of distinct pointer
types lacks a cast [-Wcompare-distinct-pointer-types]
4449 | if ((iop->public.read_func == (
ssize_t(*)() ) read) && tmout > 0)
| ^~
Repeat-By:
setting CFLAGS to -std=gnu23 on gcc new enough to support it
( installed gawk is 5.2.2 trying to upgrade to 5.3.0 )
- io.c incompatible pointer between public.read_func and ssize_t(*)() with c23,
Jeffrey Cliff <=
- Re: io.c incompatible pointer between public.read_func and ssize_t(*)() with c23, arnold, 2024/08/10
- Re: io.c incompatible pointer between public.read_func and ssize_t(*)() with c23, Jeffrey Cliff, 2024/08/10
- Re: io.c incompatible pointer between public.read_func and ssize_t(*)() with c23, Eli Zaretskii, 2024/08/10
- Re: io.c incompatible pointer between public.read_func and ssize_t(*)() with c23, arnold, 2024/08/10
- Re: io.c incompatible pointer between public.read_func and ssize_t(*)() with c23, Jeffrey Cliff, 2024/08/10
- Re: io.c incompatible pointer between public.read_func and ssize_t(*)() with c23, arnold, 2024/08/10
- Re: io.c incompatible pointer between public.read_func and ssize_t(*)() with c23, Eli Zaretskii, 2024/08/11
- Re: io.c incompatible pointer between public.read_func and ssize_t(*)() with c23, Collin Funk, 2024/08/11
- Re: io.c incompatible pointer between public.read_func and ssize_t(*)() with c23, arnold, 2024/08/11
- Re: io.c incompatible pointer between public.read_func and ssize_t(*)() with c23, Eli Zaretskii, 2024/08/11