Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Apr 2005 18:36:27 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Joseph Koshy <joseph.koshy@gmail.com>
Cc:        freebsd-standards@freebsd.org
Subject:   Re: Standard type for code pointers?
Message-ID:  <20050420163627.GA1316@falcon.midgard.homeip.net>
In-Reply-To: <84dead720504200910441b9108@mail.gmail.com>
References:  <84dead720504200541539f4c15@mail.gmail.com> <03f22a3c76ac440b97e2179761dfd6fa@xcllnt.net> <20050420155407.GA844@falcon.midgard.homeip.net> <84dead720504200910441b9108@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@student.uu.se



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050420163627.GA1316>