Pointers to functions

Henry Spencer henry at utzoo.uucp
Sat Mar 12 08:15:28 AEST 1988


> The idea to have the same pointer arithmetic on labels as on pointers to
> functions seems to be a good one (in my opinion)...

X3J11 supports this view entirely, since neither is allowed to participate
in arithmetic in any way.  This is a practical necessity; on some machines,
pointers to functions are very strange "magic cookies" whose contents don't
even slightly resemble pointers to data, and pointers to random spots in
the code basically don't exist.

> ... Secondly this would allow additional entry points into functions.

Some machines cannot do this, period.  It's also not at all clear that it
is particularly useful, which is probably why nobody ever did anything
with the "entry" keyword.
-- 
Those who do not understand Unix are |  Henry Spencer @ U of Toronto Zoology
condemned to reinvent it, poorly.    | {allegra,ihnp4,decvax,utai}!utzoo!henry



More information about the Comp.lang.c mailing list