4 ms·
Any pointer converts to void* without warning. That's pretty weak.
by glouwbug 2y ago
Any pointer converts to void* without warning. That's pretty weak.
- uecker 2y agoThis is the point of void*, one does not have to use it.
- glouwbug 2y agovoid* malloc(size_t size); void free(void *ptr); You use it a lot more than you think ;)
- uecker 2y agoThis is not a type safety issue though. For malloc the size has to agree. But in any case, you could wrap it into type-aware allocation demonstrating that this is not a limitation of the type system.