Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Apr 2005 17:54:08 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        freebsd-standards@freebsd.org
Subject:   Re: Standard type for code pointers?
Message-ID:  <20050420155407.GA844@falcon.midgard.homeip.net>
In-Reply-To: <03f22a3c76ac440b97e2179761dfd6fa@xcllnt.net>
References:  <84dead720504200541539f4c15@mail.gmail.com> <03f22a3c76ac440b97e2179761dfd6fa@xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 20, 2005 at 08:34:18AM -0700, Marcel Moolenaar wrote:
> 
> On Apr 20, 2005, at 5:41 AM, Joseph Koshy wrote:
> 
> >I'm looking for a standard type that is defined to have at least
> >as many bits as needed to hold a pointer to code.  What would
> >that be?
> 
> intptr_t is probably what you want.

Except that intptr_t need only be large enough to hold an object
pointer.  This is not necessarily enough to hold a function pointer.

The only standard types that are guaranteed to be able to hold a
function pointer are other function pointers.


-- 
<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?20050420155407.GA844>