This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Calling functions through a pointer of incorrect type


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]