Yesterday I wrote a C code that, for some values of the parameters, was just an obfuscated way of dereferencing the null pointer. GCC detected that and simply decided to generate the instruction UD (undefined instruction) on that execution path. It was fun to see the concept of “undefined behavior” taken so literally. 😋
@otini I didn’t know this instruction. Do you know if it is possible to ask GCC for emitting a warning when it generates it?
@lthms It would be strange if not, though I haven't looked into it.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!