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
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.
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
I didn't think a C compiler _could_ be written in portable C thanks the stdarg.h hell and offsetof()?
You're confusing writing the compiler in portable C with writing headers that work on an arbitrary compiler.
But the stdarg.h header _has_ to be implemented in some form to be compliant. I _suppose_ I could embed stdarg.h into the compiler itself >>
The stdarg.h provided by your C implementation has nothing to do with the C implementation used to compile your compiler.
... yea you're right w/ your first tweet. I'm confusing myself, sorry :P.
The language used to write the C compiler is outside the scope of the C language standard, surely.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.