From owner-freebsd-standards@FreeBSD.ORG Wed Apr 20 15:54:11 2005 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BD7F16A4CE for ; Wed, 20 Apr 2005 15:54:11 +0000 (GMT) Received: from pne-smtpout2-sn2.hy.skanova.net (pne-smtpout2-sn2.hy.skanova.net [81.228.8.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3198443D49 for ; Wed, 20 Apr 2005 15:54:10 +0000 (GMT) (envelope-from ertr1013@student.uu.se) Received: from falcon.midgard.homeip.net (212.181.162.201) by pne-smtpout2-sn2.hy.skanova.net (7.1.026.7) id 42662CF10001765B for freebsd-standards@freebsd.org; Wed, 20 Apr 2005 17:54:09 +0200 Received: (qmail 891 invoked by uid 1001); 20 Apr 2005 15:54:08 -0000 Date: Wed, 20 Apr 2005 17:54:08 +0200 From: Erik Trulsson To: Marcel Moolenaar Message-ID: <20050420155407.GA844@falcon.midgard.homeip.net> Mail-Followup-To: Marcel Moolenaar , Joseph Koshy , freebsd-standards@freebsd.org References: <84dead720504200541539f4c15@mail.gmail.com> <03f22a3c76ac440b97e2179761dfd6fa@xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <03f22a3c76ac440b97e2179761dfd6fa@xcllnt.net> User-Agent: Mutt/1.5.9i cc: freebsd-standards@freebsd.org Subject: Re: Standard type for code pointers? X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2005 15:54:11 -0000 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. -- Erik Trulsson ertr1013@student.uu.se