Proposal: Try to write a C compiler that violates programmers' expectations in the most extreme way possible while still being std compliant
-
-
size_t is two bytes, void* is 4, but function pointers are 8
-
i've been working lately with emscripten where function pointers-- for an actually legitimate reason-- are not numbers
-
At best/worst they're a really big number, because C has Representation of Types.
-
I thought intptr_t's existence and casts was implementation defined - maybe it's in POSIX?
-
Even without intptr_t, you have the representation of the pointer, an overlaid unsigned char[sizeof(T*)]...
-
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 …
- 2 more replies
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.