*BSD News Article 85082


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!EU.net!sun4nl!fwi.uva.nl!not-for-mail
From: casper@fwi.uva.nl (Casper H.S. Dik)
Newsgroups: comp.unix.solaris,comp.unix.bsd.misc,comp.unix.internals
Subject: Re: Solaris 2.6
Supersedes: <cancel.casper.32afd1f6@mail.fwi.uva.nl>
Date: 12 Dec 1996 10:35:51 +0100
Organization: Sun Microsystems, Netherlands
Lines: 22
Distribution: inet
Message-ID: <casper.32afd1f6@mail.fwi.uva.nl>
References: <32986299.AC7@mail.esrin.esa.it> <casper.329d5a07@mail.fwi.uva.nl> 	<5869r2$175$1@asgard.sprintlink.co.za> 	<587mc1$1dc@cucumber.demon.co.uk> <589rd5$i2l@agate.berkeley.edu> <sylob50vto.fsf@tiktok.cygnus.com>
NNTP-Posting-Host: mail.fwi.uva.nl
Xref: euryale.cc.adfa.oz.au comp.unix.solaris:92279 comp.unix.bsd.misc:1786 comp.unix.internals:11581

meissner@cygnus.com (Michael Meissner) writes:

>Not quite.  %p is for printing void * pointers.  It is only guaranteed that
>void * pointers use the same size and format as char * pointers.  All other
>pointers do not have to be the same size and/or format (and since I'm the one
>that wrote the %p proposal in the first place, and at the time I was supporting
>a C compiler that had different pointer formats, it was intentional that it be
>only void * pointers).


But all pointers can be cast to void * and back, right?  So %p can be
used portably.

(Yep, I've worked on systems where pointer casts did change the
bit pattern)

Casper
-- 
Casper Dik - Sun Microsystems - via my guest account at the University
of Amsterdam.  My work e-mail address is: Casper.Dik@Holland.Sun.COM
Statements on Sun products included here are not gospel and may
be fiction rather than truth.