Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Oct 2004 09:14:42 -0700
From:      Mike Hunter <mhunter@ack.Berkeley.EDU>
To:        Harti Brandt <harti@freebsd.org>
Cc:        hackers@freebsd.org
Subject:   Re: please help with: warning: initialization makes integer from pointer
Message-ID:  <20041008161442.GA9862@ack.Berkeley.EDU>
In-Reply-To: <20041008173138.Y14215@beagle.kn.op.dlr.de>
References:  <20041005054213.GA11770@lesanti.hq.sinectis.com.ar> <20041005202816.GA14973@titan.klemm.apsfilter.org> <20041005205040.GH31397@lesanti.hq.sinectis.com.ar> <20041006060437.GA23364@titan.klemm.apsfilter.org> <20041006144220.GA29653@lesanti.hq.sinectis.com.ar> <416579E1.8050308@nuclearelephant.com> <20041008152905.GA3106@dan.emsphone.com> <20041008173138.Y14215@beagle.kn.op.dlr.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Oct 08, "Harti Brandt" wrote:

> On Fri, 8 Oct 2004, Dan Nelson wrote:
> 
> Memset is actually not portable if the structure contains pointers because 
> it would initialize the pointers to 0 values not to 0 pointers. A 0 
> pointer not necessarily has a 0 value. A pointer can be portably be 
> initialize to the 0-pointer only by assigning NULL (or 0) (or by assigning 
> another pointer that is alreay initialized).

Sick!

Are there actually systems out there that don't have "all-zero" NULL pointers?

You have officially shattered my previously held beliefs about the
sacredness of memset :(

Mike



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