My toy compiler crashes if I divide by zero in a constant expression:
int x = 1 / 0;
Is this behaviour allowed by the C and/or C++ standards?>
How the compiler should behave is unrelated to the value of the expression. The compiler should not crash. Period.
I imagine that a pedantic implementation, given an expression like this, would compile to code that will execute 1/0 at run time, but I don't think that would be seen as a good feature.
So the remaining space is that the compiler should decline to compile it, and treat it as some class of source code error.