> the trouble started with sizeof(void) = 1
Says who?
Code:
#include <stdio.h>
#include <stdlib.h>
int main ( ) {
printf("%d\n", sizeof(void) );
return 0;
}
gcc reports
foo.c:5: warning: invalid application of `sizeof' to a void type
vc6 reports either
foo.c(5) : warning C4034: sizeof returns 0
foo.c(5) : error C2070: illegal sizeof operand
You can't have a variable with void type, even if your compiler apparently gives it a non-zero size.
> on similar terms sizeof empty class/structure in C++ is also 1
But C can't have an empty struct.