This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Calling functions through a pointer of incorrect type
- From: Florian Weimer <fweimer at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 22 Mar 2016 10:19:55 +0100
- Subject: Calling functions through a pointer of incorrect type
- Authentication-results: sourceware.org; auth=none
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