Date: Thu, 17 Jan 2002 18:26:39 +0000 From: Tony Finch <dot@dotat.at> To: hackers@freebsd.org Cc: dot@dotat.at Subject: pedantic kobj problem Message-ID: <20020117182639.A26828@chiark.greenend.org.uk>
next in thread | raw e-mail | index | archive | help
I note that kobj uses a pointer to int kobj_error_method(void) when
it can't find an implementation of an interface in a class's method
list and the interface has no default implementation. However, the
C standard says in section 6.3.2.3:
[#8] A pointer to a function of one type may be converted to
a pointer to a function of another type and back again; the
result shall compare equal to the original pointer. If a
converted pointer is used to call a function whose type is
not compatible with the pointed-to type, the behavior is
undefined.
and kobj_error_method is (necssarily) of a different type from all
actual interfaces.
Obviously this doesn't matter except in perverted C implementations
that (say) use pascal calling conventions, but I note it in case of
anyone trying to use kobj on such a system :-)
Tony.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020117182639.A26828>
