https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114216

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>when building gcc with CFLAGS=" -std=gnu2x "


Why are you building with this?

Also basically target.c is still written in C99.

This patch should fix the issue though:
```
diff --git a/libgomp/target.c b/libgomp/target.c
index 1367e9cce6c..945244b33de 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -3447,7 +3447,7 @@ gomp_target_rev (uint64_t fn_ptr, uint64_t mapnum,
uint64_t devaddrs_ptr,

   if (n == NULL)
     gomp_fatal ("Cannot find reverse-offload function");
-  void (*host_fn)() = (void (*)()) n->k->host_start;
+  void (*host_fn)(void*) = (void (*)(void*)) n->k->host_start;

   if ((devicep->capabilities & GOMP_OFFLOAD_CAP_SHARED_MEM) || mapnum == 0)
     {

```

> but it really does seem like something specific is broken at that point that 
> should be documented

It is documented in the C standard as being an incompatible change between
C11/C17/C90/C99 and C23. Basically `()` as the function paramaters is no longer
the same as `(...)` but rather the same as `(void)`.

Reply via email to