We've all heard the warnings that if you invoke **undefined behaviour** in C or C++, *anything at all* can happen.

Is this limited to *any runtime behaviour at all*, or does this also include any compile-time behaviour? In particular, is a compiler, upon encountering a construct that invokes undefined behaviour, allowed to reject the code (in the absence of other requirements in the standard to do so), or even to crash?