Pointer arithmetic for void pointer in C
Final conclusion: arithmetic on a void* is illegal in both C and C++. GCC allows it as an extension, see Arithmetic on void– and Function-Pointers (note that this section is part of the “C Extensions” chapter of the manual). Clang and ICC likely allow void* arithmetic for the purposes of compatibility with GCC. Other compilers … Read more