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. You can reproduce an object value by copying its representation. This is covered under 6.2.6.1¶4, 6.5¶6.
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.