Proposal: Try to write a C compiler that violates programmers' expectations in the most extreme way possible while still being std compliant
-
-
is that guaranteed to work by the spec
-
yes, necessary for memcpy to be able to copy them
-
Okay. I misunderstood: The pointers *are* numeric, but behave surprisingly at times https://kripken.github.io/emscripten-site/docs/porting/guidelines/function_pointer_issues.html …
-
i had found you can't compare the FPs, and falsely concluded they were not truly numeric as a result
-
incidentally, the way emscripten handles null function pointers is sorta wild
End of conversation
New conversation -
-
-
...which you can interpret as a big number consisting of sizeof(T*)*CHAR_BIT binary digits.
-
This doesn't imply any algebraic correspondence between pointer arithmetic & arithmetic on the representation...
-
...but it does mean you can round-trip ptrs through arbitrarily-obfuscating intermediates, including over-wire or crypto
-
printf/scanf %p can also do that.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.