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
Well the compiler itself would have undefined behavior if it's written in C and it reads in text mode a file that's not a text file. :-)
To make it implementation-defined, you'd be mandating that the compiler has to handle this case, which can't be done portably in C.
Thus you'd be precluding writing the C compiler in portable C.
I think they already crossed that bridge though :)
Are you sure? I don't see anything they've done that precludes it.
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.
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.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.