3 ms·
Just to be an onerous bastard: As the code involves undefined behaviour, it's superfluous to reason about any output. Only values of type void* are valid argum
by cygx 15y ago
Just to be an onerous bastard: As the code involves undefined behaviour, it's superfluous to reason about any output.
Only values of type void* are valid arguments in case of the %p conversion specifier as there need not be a uniform pointer representation.
- pwaring 15y agoIndeed, and if you use -Wall -Wextra -ansi -pedantic you get: pointer-test.c:7:3: warning: format ‘%p’ expects type ‘void * ’, but argument 2 has type ‘int * ’ Same goes for using -std=c99 instead of -ansi, although casting to (void *) does get rid of the warning.