Skip to content

Commit 26ee21e

Browse files
author
Release Manager
committed
gh-40228: Apply gap build fix for gcc-15 Taken from https://src.fedoraproject.org/rpms/gap/blob/rawhide/f/gap-c23.patch There might be gap packages that need to be fixed separately, but this at least lets us compile the base gap URL: #40228 Reported by: Volker Braun Reviewer(s): Dima Pasechnik
2 parents b8cedec + 85c0356 commit 26ee21e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

build/pkgs/gap/patches/gap-c23.patch

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Works around numerous errors of this form:
2+
3+
src/bool.c: In function ‘InitKernel’:
4+
src/bool.c:332:22: error: passing argument 1 of ‘InitHandlerFunc’ from incompatible pointer type [-Wincompatible-pointer-types]
5+
332 | InitHandlerFunc( ReturnTrue1, "src/bool.c:ReturnTrue1" );
6+
| ^~~~~~~~~~~
7+
| |
8+
| struct OpaqueBag * (*)(struct OpaqueBag *, struct OpaqueBag *)
9+
In file included from src/bool.c:20:
10+
src/calls.h:416:30: note: expected ‘ObjFunc’ {aka ‘struct OpaqueBag * (*)(void)’} but argument is of type ‘struct OpaqueBag * (*)(struct OpaqueBag *, struct OpaqueBag *)’
11+
416 | void InitHandlerFunc(ObjFunc hdlr, const Char * cookie);
12+
| ~~~~~~~~^~~~
13+
src/bool.c:172:12: note: ‘ReturnTrue1’ declared here
14+
172 | static Obj ReturnTrue1(Obj self, Obj val1)
15+
| ^~~~~~~~~~~
16+
In file included from src/gasman.h:39,
17+
from src/objects.h:20,
18+
from src/bool.h:16,
19+
from src/bool.c:17:
20+
src/common.h:168:16: note: ‘ObjFunc’ declared here
21+
168 | typedef Obj (* ObjFunc) (/*arguments*/);
22+
| ^~~~~~~
23+
24+
--- a/src/common.h.orig 2024-12-05 02:15:31.000000000 -0700
25+
+++ b/src/common.h 2025-01-16 19:37:36.186901774 -0700
26+
@@ -165,7 +165,7 @@ typedef Bag Obj;
27+
#ifndef __cplusplus
28+
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
29+
#endif
30+
-typedef Obj (* ObjFunc) (/*arguments*/);
31+
+typedef void *ObjFunc;
32+
#pragma GCC diagnostic pop
33+
34+
typedef Obj (* ObjFunc_0ARGS) (Obj self);

0 commit comments

Comments
 (0)