LWN.net Logo

Advertisement

E-Commerce & credit card processing - the Open Source way!

Advertise here

A small nit-pick...

Posted Mar 19, 2008 22:52 UTC (Wed) by vmole (subscriber, #111)
In reply to: A small nit-pick... by dw
Parent article: Who maintains dpkg?

Oops, you're correct about that. I just looked in Plauger and Brodie's "Standard C" (which is not the standard, but I think we can trust them), and they agree: it's *object* pointers that can be intraconverted with void pointers.

But the hilarious thing is this:

The types _pointer_to_char_, _pointer_to_signed_char_, _pointer_to_unsigned_char_, and _pointer_to_void_ all share the same representation.
So "(void *) 0" is interchangeable with "(char *) 0", but not "0" or "(int *) 0".


(Log in to post comments)

A small nit-pick...

Posted Mar 19, 2008 23:15 UTC (Wed) by nix (subscriber, #2304) [Link]

This is surely related to the aliasing rules, which also have a similar 
special hole allowing aliasing of of void * and char *, but not of 
pointers of any other distinct types.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.