Re: [PATCH v2 1/2] system_data_types.7: Add 'void *'

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

 



If you're going to document this at all, I suggest documenting 'void' as well as 'void *', and putting both sets of documentation into the same man page.

For 'void *' you should also mention that one cannot use arithmetic on void * pointers, so they're special in that way too. Also, you should warn that because one can convert from any pointer type to void * and then to any other pointer type, it's a deliberate hole in C's type-checking. It might not also hurt to mention 'void const *', 'void volatile *', 'void const volatile *', etc.

For 'void' you can mention the usual things, such as functions returning void, and functions declared with (void) parameters, why one would want to cast to (void), and so forth.

You're starting to document the C language here, and if you're going to do that you might as well do it right.



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux