TIL! I went and dug up a citation: https://blog.reverberate.org/2013/08/parsing-c-is-literally-...
1,911 karma · joined March 8, 2009
TIL! I went and dug up a citation: https://blog.reverberate.org/2013/08/parsing-c-is-literally-...
If you don't set the underlying type, assigning a value that doesn't match an enumerator via `static_cast` is undefined behavior. See https://en.cppreference.com/w/cpp/language/enum . (Doing weird pointer casting things is also undefined behavior per the strict aliasing rule, though, come to think of it, I'm not sure whether memcpying an out-of-range value into an enum through the "reinterpret_cast to `char*`" loophole is undefined behavior.)
There was a port to the original Xbox, which had only 64 MB of RAM!
The article links out to Compiler Explorer (https://godbolt.org/), which shows the exact compiler version and options and lets you play with different ones. It shouldn’t matter which compiler — the standard prohibits optimizing this.
I didn’t write it, I just copied the compiler output from Godbolt so that the article could be read on mobile, where Godbolt’s UI doesn’t work so well and switching tabs back and forth is difficult.
Are you talking about ARM64 or ARMv7?
This is what I get for duplicating the examples across Godbolt and the post itself. It was originally 3D for no particular reason and I cut it to keep things short.
I've also seen common cold listed as a potential cause, which definitely jibes with my experience.
If size is really important, you probably want to try -Os (optimize for size) and -Oz (try harder to optimize for size, including at the expense of CPU) as well.
> LTO
If your project gets big enough that -flto results in unacceptable link times, try -flto=thin.
Why do you think that this will entirely fail to incentivize prospective retirees to work for more total years of their lives in order to benefit from increased pay?
What? This is why investment advice for retirement generally revolves around allocation into stocks and bonds while leaving only an emergency fund plus regular expenses in more liquid assets like savings accounts. Inflation will only eat your savings if you fail to invest. If you want to talk about risk, well, inflation is why a total failure to accept risk is extremely risky!
Surprised that this hasn't been exploited to build a C compiler targeting the platform. (Unless I needed to Google something other than "pico-8 C compiler"...)