[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: NULL pointers.

From: Mark Grosberg <mark_at_nolab.conman.org>
Date: 2003-10-15 04:56:58 CEST

On Mon, 13 Oct 2003, Jack Repenning wrote:

> > struct some_complex_struct __tmp = { 0 };
> Doesn't this fail for the case where the _first_ field of
> some_complex_struct is a pointer, and the local architecture does
> something inane with NULL?

Nope. It is the C compiler, not the preprocessor that translates the
unadorned "0" to a "NULL" pointer. If, for example, 0x80000000 were NULL
on an x86, then the statement:

   char *p_foo = 0;

would be translated by the compiler as:

   MOV [p_foo], 80000000h

Mark G.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 15 04:57:46 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.