public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Calling functions through a pointer of incorrect type
@ 2016-03-22  9:20 Florian Weimer
  2016-03-22 19:14 ` Joseph Myers
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2016-03-22  9:20 UTC (permalink / raw)
  To: GNU C Library

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-29 21:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-22  9:20 Calling functions through a pointer of incorrect type Florian Weimer
2016-03-22 19:14 ` Joseph Myers
2016-03-22 20:25   ` Florian Weimer
2016-03-22 21:33     ` Joseph Myers
2016-03-29 21:27       ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).