Re: Casting function pointers



In comp.arch.embedded,
Arlet Ottens <usenet+5@xxxxxxxxxx> wrote:
KKL wrote:

Ok, so I accept my offense that the code snippets have syntactical
issues and that is because I did not simply copy it from my C source
files but just wrote it in hurry to put up an example for my point of
discussion which was "IS TYPE CASTING FUNCTION POINTERS FROM void (*)
(int) TO (void *) AND BACK TO void (*)(void) AND THEN USING IT TO
CALL FUNCTIONS IS A VALID AND SAFE OPERATION OR NOT".

According to the C99 standard, paragraph 6.3.2.3p8:

He posted C++ code IIRC, so that standard does not apply.

--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)

.