RE: Re: Managing accidental read/writes to address zero

"Martin.J Thompson" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <[email protected]>
>
>
>>>> [email protected] 12 May 2005 13:58:24 >>>
>I was thinking of something like
>#define	NULL	0xF0000000

You can't redefine NULL, it is *defined* by the language to be "0" in a
pointer context, the compiler then turns it into whatever it's internal
representation of a null pointer is (which may or may not be a valid
memory location, and may not be location 0)

See http://www.eskimo.com/~scs/C-faq/s5.html, esp Qs 5.2, 5.4, and for
people like me (hardware enigneers who hack C occasionally) 5.15!

Cheers,
Martin


-- 
Martin Thompson CEng MIEE
TRW Conekt, Stratford Road, Solihull, B90 4GW. UK
+44 (0)121-627-3569 : [email protected]
http://www.conekt.net/


-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MPC500/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.