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

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

 



On 10/2/20 2:10 AM, David Laight wrote:
  > 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.

That isn't what the C standard says at all.
What is says is that you can cast any data pointer to 'void *'
and then cast it back to the same type.

I was talking about compile-time checking; you're talking about run-time behavior. We're both right in our own domains. It is a tricky area, and this suggests that perhaps we shouldn't be trying to document this stuff in a libc/kernel manual.



[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