4 ms·
> If you pass a pointer-to-int instead, technically the behaviour is undefined. But if you cast the intptr to voidptr, the behavior is defined, right? (Besides
by verall 6y ago
> If you pass a pointer-to-int instead, technically the behaviour is undefined.
But if you cast the intptr to voidptr, the behavior is defined, right? (Besides that %p is nonstandard iirc)
- eMSF 6y agoYes. Also, %p isn't non-standard, however the conversion is implementation-defined. (The reason why I used the word technically earlier was because on all common platforms int-pointers and void-pointers – and indeed all object pointers – have identical binary representation.)