In an early version of the C compiler gcc, when the pragma directive was introduced, it took the "implementation-defined" effect literally and tried to launch computer games.
@RadicalEdward classic stallman move, doing something totally unhelpful to push a point at people who can't do anything about it
Then again that didn't exist at the time. Which leads to an actual point, context. The version cited there was released in 1989. It was a different time. GCC was released only two years earlier, Linux 3-4 years later, it certainly didn't play the role it does today.
Would it be a bad idea to do this today? Probably. Back then it may have been a perfectly fine joke among friends.
@RadicalEdward The problem of "implementation-defined" and "undefined" behaviours that are too numerous in C and C++: the compiler can do anything (ignoring the lines, launching a game, removing the files, formating the disks, etc.). Those should not exist in a programming language.
As long as the implemented behaviors are properly documented, undefined behaviours can be useful hooks: don't forget that C is a language designed to be used in a wide variety of use cases: portability is valuable in many of them, but sometimes is not relevant at all.
@RadicalEdward as a kind of related point, people actually like user-hostile compilers.
The real point here is about implementation and undefined behaviour, and how compilers can be turbounforgiving in these circumstances. But developers consistently vote for dangerous UB handling. How is this?
They consistently rank compilers by speed of the generated code. If gcc produces code that's 10% faster, but relies on aggressive UB handling, people will continue to propose its use over safer, slower compilers.
This is a world of our own making.
A bunch of technomancers in the fediverse. Keep it fairly clean please. This arcology is for all who wash up upon it's digital shore.