Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 944076 - =net-im/pidgin-2.14.13 fails with c23/gcc-15.0.0_pre20241117-r2: error: passing argument 5 of 'ZSrvSendList' from incompatible pointer type [-Wincompatible-pointer-types]
Summary: =net-im/pidgin-2.14.13 fails with c23/gcc-15.0.0_pre20241117-r2: error: passi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Andreas Schürch
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c23-porting
  Show dependency tree
 
Reported: 2024-11-20 07:09 UTC by tdr
Modified: 2024-11-24 22:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (tdr-emerge--info.txt,6.30 KB, text/plain)
2024-11-20 07:10 UTC, tdr
Details
build fail log (pidgin-2.14.13.build.log,431.19 KB, text/plain)
2024-11-20 07:10 UTC, tdr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tdr 2024-11-20 07:09:38 UTC
c23 is more strict than previous standards
this is different in that it requires -fpermissive along with -std=gnu17 to build successfully

Reproducible: Always

Actual Results:  
ZSendList.c: In function 'ZSendList':
ZSendList.c:13:8: warning: old-style function definition [-Wold-style-definition]
   13 | Code_t ZSendList(notice, list, nitems, cert_routine)
      |        ^~~~~~~~~
ZSendList.c:19:61: error: passing argument 5 of 'ZSrvSendList' from incompatible pointer type [-Wincompatible-pointer-types]
   19 |     return(ZSrvSendList(notice, list, nitems, cert_routine, Z_XmitFragment));
      |                                                             ^~~~~~~~~~~~~~
      |                                                             |
      |                                                             Code_t (*)(ZNotice_t *, char *, int,  int) {aka int (*)(struct _ZNotice_t *, char *, int,  int)}
ZSetSrv.c: In function 'ZSetServerState':
In file included from internal.h:9,
                 from ZSendList.c:11:
./zephyr_internal.h:166:63: note: expected 'Code_t (*)(void)' {aka 'int (*)(void)'} but argument is of type 'Code_t (*)(ZNotice_t *, char *, int,  int)' {aka 'int (*)(struct _ZNotice_t *, char *, int,  int)'}
  166 | Code_t ZSrvSendList ZP((ZNotice_t*, char*[], int, Z_AuthProc, Code_t (*)()));
      |                                                               ^~~~~~~~~~~~
./zephyr_internal.h:33:16: note: in definition of macro 'ZP'
   33 | # define ZP(x) x
      |                ^
ZSetSrv.c:13:8: warning: old-style function definition [-Wold-style-definition]
   13 | Code_t ZSetServerState(state)
      |        ^~~~~~~~~~~~~~~
ZSendList.c: In function 'ZSrvSendList':
ZSendList.c:22:8: warning: old-style function definition [-Wold-style-definition]
   22 | Code_t ZSrvSendList(notice, list, nitems, cert_routine, send_routine)
      |        ^~~~~~~~~~~~
ZSendList.c:42:37: error: passing argument 4 of 'Z_SendFragmentedNotice' from incompatible pointer type [-Wincompatible-pointer-types]
   42 |                                     send_routine);
      |                                     ^~~~~~~~~~~~
      |                                     |
      |                                     Code_t (*)(void) {aka int (*)(void)}
In file included from /usr/include/features.h:511,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from ./sysdep.h:15,
                 from internal.h:4:
internal.h:115:47: note: expected 'Z_SendProc' {aka 'int (*)(struct _ZNotice_t *, char *, int,  int)'} but argument is of type 'Code_t (*)(void)' {aka 'int (*)(void)'}
  115 |                                    Z_SendProc send_func));
      |                                    ~~~~~~~~~~~^~~~~~~~~


builds successfully with CFLAGS="${CFLAGS} -std=gnu17 -fpermissive"
Comment 1 tdr 2024-11-20 07:10:22 UTC
Created attachment 910438 [details]
emerge --info
Comment 2 tdr 2024-11-20 07:10:50 UTC
Created attachment 910439 [details]
build fail log
Comment 3 Larry the Git Cow gentoo-dev 2024-11-24 22:24:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c23881a956db64fc2a65108dd907b334d8d06b20

commit c23881a956db64fc2a65108dd907b334d8d06b20
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-11-24 22:19:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-11-24 22:19:20 +0000

    net-im/pidgin: build w/ -std=gnu17
    
    No point in worrying about 2.x. We can see about C23 with 3.x.
    
    Closes: https://bugs.gentoo.org/944076
    Signed-off-by: Sam James <sam@gentoo.org>

 net-im/pidgin/pidgin-2.14.13.ebuild | 3 +++
 1 file changed, 3 insertions(+)