NULL v. zero
Posted Jul 26, 2004 16:41 UTC (Mon) by h.j.thomassen
Parent article: NULL v. zero
vivi48: You are correct. I looked in my copy of the ISO/IEC FDIS 9899
(i.e. the C-99 standard at ISO-level) and it says in para. 6.2.5 :
<quote:> A pointer to void shall have the same representation and alignment
requirements as a pointer to a character type. <footnote:> Meant to
imply interchangeability as arguments to functions, return values
from functions, and members of unions. <end quote>
(ANSI X3.159-1989 has this same text in para. 220.127.116.11 )
Also: the va_arg description (para 18.104.22.168) has a discussion about
type-mismatches between caller and callee, and it says that this
will have undefined behaviour, except if <quote:> one type is pointer
to void and the other is a pointer to a character type <end quote>.
Thanks for pointing :-) this out.
to post comments)