a strong contender for the stupidest undefined behavior in C (thanks for reminding about this one @shafikyaghmour)pic.twitter.com/mBWojVSaMF
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
If so that's just an implementation bug and probably easily corrected. Would be interesting to use latest UB/aliasing sanitizer on pcc.
but back to the original question, why wouldn't a compiler just open text files in binary mode?
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.
ISO C's notion of "text file" is utterly idiotic and counter to any real-world practices in the past 3-4 decades.
ok this is a corner of ISO I will happily never learn about in detail I hope
If your assumption is POSIX||Windows, yes, assuming text files are either same as binary or just do silly \r\n stuff is fine.
I'll handle violations of this assumption with the same priority that I handle non-two's-complement
Or non-divisible by 8 CHAR_BIT
ok just tried UBSan on latest pcc snapshot and it executes plenty of UB
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.