在 2024-08-06 00:49, Hannes Domani 写道:
I thought the 'correct' way to do this is by casting to (void(*)(void)), at least that's how the gcc docu says this warning should be suppressed: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcast-function-type
Yes, it makes sense in this case.However we notice that `GetProcAddress()` can also be used to obtain a pointer to a dllexport'd object, so `intptr_t` or `INT_PTR` might be deemed a unified solution. (And at the ABI level it doesn't make a difference to use any pointer type.)
-- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public