Re: variadic null ptr
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Re: variadic null ptr




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: variadic null ptr  
Rainer Weikusat


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-20-07 12:19 PM

Erik Max Francis <max@alcyone.com> writes:
> Frank Cusack wrote: 
>
> The Standard does not require that the sizes and layouts of the
> different data pointer types be equivalent.
> It does require that void * be able to hold every other pointer
> type, and that char * and void * have the same layout, but it makes
> no other requirements for any other types.

'The Standard' presumably refers to 'the ISO C-Standard' here. That
actually specifies somewhat more requirements, specifically, that all
pointers to structs 'have the same representation and alignment
requirements as each other' and 'all pointers to unions [same]'.

> In other words, say, (int *) 0 and (float *) 0 could have
> different values or even sizes.

"It depends". What SUS calls 'XSI' (X/Open System Interface) requires
that all pointers types can be used interchangeably for
stdarg-routines. A lot of other information source (like
http://www.unix.org/whitepapers/64bit.html) just assume this.

Since this group is generally targeted at actually programming
something, I'd like to ask which architectures with some UNIX(*) or
something like UNXI(*) running on them actually have (or had)
differerent pointer types for different pointed-to types.








[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:26 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register