I mean in practice there probably aren't any compilers that don't violate things like strict aliasing
-
-
If so that's just an implementation bug and probably easily corrected. Would be interesting to use latest UB/aliasing sanitizer on pcc.
2 replies 0 retweets 0 likes -
but back to the original question, why wouldn't a compiler just open text files in binary mode?
2 replies 0 retweets 2 likes -
Because C doesn't specify that text files work that way. If they're record-sequences of lines they might read very strange in binary mode.
1 reply 1 retweet 1 like -
Replying to @RichFelker @johnregehr and
ISO C's notion of "text file" is utterly idiotic and counter to any real-world practices in the past 3-4 decades.
1 reply 1 retweet 2 likes -
ok this is a corner of ISO I will happily never learn about in detail I hope
1 reply 0 retweets 2 likes -
If your assumption is POSIX||Windows, yes, assuming text files are either same as binary or just do silly \r\n stuff is fine.
1 reply 0 retweets 0 likes -
I'll handle violations of this assumption with the same priority that I handle non-two's-complement
1 reply 1 retweet 5 likes -
-
Replying to @TheEpsylon @johnregehr and
I'm still waiting for that new 9-bit char CPU w/ a C compiler, just because it would be twisted and hilarious!
2 replies 0 retweets 0 likes
And useless for running anything, thus an immediate failure and waste of billions of $ in development costs.
-
-
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.