Standard type for code pointers?
Erik Trulsson
ertr1013 at student.uu.se
Wed Apr 20 09:36:30 PDT 2005
On Wed, Apr 20, 2005 at 04:10:30PM +0000, Joseph Koshy wrote:
> > Except that intptr_t need only be large enough to hold an
> > object pointer. This is not necessarily enough to hold a
> > function pointer.
>
> Right.
>
> > The only standard types that are guaranteed to be able to hold
> > a function pointer are other function pointers.
>
> Right, but there doesn't seem to be a C99 name for function
> pointer types.
No, but since any function pointer type is large enough to hold any
function pointer you can just pick one.
(But when you actually call a function pointer, it must be a pointer of
the correct type.)
>
> Is 'register_t' guaranteed to be wide enough?
No idea. It is not part of the C standard anyway.
--
<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se
More information about the freebsd-standards
mailing list