This is not a standard gcc extension, but has a rationale. When you perform pointer arithmetic by adding or removing one unit, this means adding or removing an object that points to the size. Thus, defining sizeof(void) as 1 helps to define void* as a pointer to a byte (untyped memory address). Otherwise, you would have amazing behavior using pointer arithmetic, like p+1 == p , when p is void* .
The standard way would be to use `char * for this purpose (pointer to byte).
source share