3 ms·
Is there a call site that passes void to that macro?
by ndesaulniers 8y ago
Is there a call site that passes void to that macro?
- nwellnhof 8y agoYou don't have to pass void to sizeof explicitly (which, by the way, is an operator, not a macro). The typical use case is arithmetic on void pointers, for example: void f(void *buf) { // Clear bytes 10-19 memset(buf + 10, 0, 10); } Making void pointers behave like char pointers avoids pointer casts in cases like this.