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
but as always, when there is a choice of acceptable behaviors, the right answer is to make it implementation-defined
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.
I don't understand. What do you mean by "stdio text mode". fread/fwrite/fopen?
fopen(name, "r"); as opposed to "rb".
POSIX requires that they behave identically, but plain C allows text mode to be a record-sequence of "lines" rather than a byte stream.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.