Proposal: Try to write a C compiler that violates programmers' expectations in the most extreme way possible while still being std compliant
-
-
Replying to @mcclure111
Too easy. More interesting if you constrain to POSIX's requirements & 2s complement. Then you have to find subtle stuff.
1 reply 0 retweets 2 likes -
Replying to @RichFelker @mcclure111
size_t is two bytes, void* is 4, but function pointers are 8
2 replies 0 retweets 0 likes -
Replying to @simrob @RichFelker
i've been working lately with emscripten where function pointers-- for an actually legitimate reason-- are not numbers
1 reply 0 retweets 3 likes -
Replying to @mcclure111 @simrob
At best/worst they're a really big number, because C has Representation of Types.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @mcclure111
I thought intptr_t's existence and casts was implementation defined - maybe it's in POSIX?
1 reply 0 retweets 0 likes -
Replying to @simrob @mcclure111
Even without intptr_t, you have the representation of the pointer, an overlaid unsigned char[sizeof(T*)]...
2 replies 0 retweets 1 like -
-
yes, necessary for memcpy to be able to copy them
1 reply 0 retweets 1 like -
Replying to @erincandescent @oshepherd and
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 replies 0 retweets 0 likes
Calling with wrong signature is UB, so no problem. I don't think the false-positive = is conforming tho.
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.