C17 vs C23: () function pointer error - Is this the correct fix?
I'm working on a MASM-to-C transpiler that has zero knowledge of function parameter types. The same generated C code must compile without warnings with: GCC C17/C23 using -Wall -Wextra -Wpedantic MSVC using /W4 Among the configurations I tested, the failure occurs with GCC C23: x86-64 GCC 16.2 -std=c23 -Wall -Wextra -Wpedantic https://microsoft.godbolt.org/z/vfc96PTM9 #include <stdint.h> int MyFunA(int a){ return a; } int MyFunB(int a){ return a; } int (*MyCallBacks[])() = { &MyFunA, &MyFunB }; int main(void) { return 0; } As noted here, this works cleanly with GCC C17 because () means that th
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.