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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
```
...
get_bool(_Bool *out);

union __attribute__((transparent_union)) some_pointer {
    void *as_void_ptr;
    _Bool* as_bool_ptr;
};

void generic_get(union some_pointer);

static typeof(generic_get) *get =
    get_bool;
...
(*get)(&value);  // call through function pointer
```

I am not sure this is defined code at all. Even though the argument passing
between the 2 function types are defined to be the same; the union and pointer
are 2 different types and GCC considers that to true.

I think strongswan needs to remove this kind of hacks. And just use `void*` as
the argument type and then cast it to the correct type inside the function.

Reply via email to