by otabdeveloper4 · 2y ago · 0 comments
Hence, "void*" - a pointer to something, but it would be a syntax error to derefence this pointer.
Differently to other incomplete types void has some special behaviour: you can declare a function as returning void and return with no arguments is also special cased. You can also cast to void.
A void with proper unit semantics would simply be a complete type instead. The only special case would be return with no arguments implicitly returning a void instance, but that would be pure sugar.