lkml.org 
[lkml]   [2020]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/2] system_data_types.7: Add 'void *'
From
Date
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.

\
 
 \ /
  Last update: 2020-10-02 19:01    [W:0.079 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site