Re: inline asm question(s)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 30 Jun 2004, Jan Hudec wrote:

> > as i've said b4, i dont see what this macro has to do with the memory 
> > representation of the null pointer. 
> > the ((type *)0) member is used to get a pointer to a struct 'type',
> > which is located at address 0 -> hence, the address of the member is its
> > offset in the struct. nothing to do with actual memory... 
> 
> No. ((type *)0) is used to get a NULL pointer of given type. The
> C specification DOES say 0 must convert to NULL and does NOT say it must
> be located on address 0. In gcc, it always is, though.

thats my point. i dont care about C specifications, as u said before, but 
what gcc does. if ((type *)0) was not located at address 0, this macro 
would not work.

-- 
========================================================================
nir.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux