Calling functions through a pointer of incorrect type
Florian Weimer
fweimer@redhat.com
Tue Mar 22 09:20:00 GMT 2016
Just a sanity check: It is no longer acceptable glibc coding style to
call functions through mismatching pointer types. Correct?
Typical mismatches are: The function has an argument of type struct foo
**, but the function pointer has type void ** for the same argument. Or
the function pointer has additional trailing arguments not declared by
the function.
These calls result in undefined behavior in standard C, and I don't
think it's a support GCC extension.
Florian
More information about the Libc-alpha
mailing list