https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83437
Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bernd.edlinger at hotmail dot
de
--- Comment #1 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
This is on purpose, because the return value
is different: you cast a function returning int
to a function returning void*.
The warning can be suppressed by casting
thru (void(*)(void)) which is accepted as a
type-less function type:
using V = void *(*)();
struct A {
A(V);
};
struct B : A {
using F = int();
B(F p1) : A((V) (void(*)(void)) p1) {}
};