In GCC 1.17, when the compiler encountered specific forms of undefined behavior (unknown/not implemented #pragmas), here’s the code it executed:
This just goes to show you that when the official C++ specification talks about undefined behavior, they mean business:
[Undefined behavior is] behavior, such as might arise upon use of an erroneous program construct or erroneous data, for which the Standard imposes no requirements.
No requirements indeed.
It turns out this is actually implementation-defined behavior, which is slightly different than undefined behavior. Implementation-defined behavior actually requires the compiler to document what it does, but there are no requirements on what it can do.
(If you liked this, you might like Cheating in Video Games.)