Messages in this thread | | | Subject | Re: [PATCH v2 1/2] system_data_types.7: Add 'void *' | From | Paul Eggert <> | Date | Fri, 2 Oct 2020 10:00:21 -0700 |
| |
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.
| |