I don't get it? How about, just don't do it? Why should anybody ever do that?
Altough its not as easy to shoot ones foot with modern high level languages, in almost all of them it is still possible to create code with ill-defined behavior.
( I welcome the collection of ill-defined ways to code for academic interests, its sometimes not too easy to find how to. But other than that, who cares? )
PS: Almost any language has ill-defined behavior by calling a sort with a custom comparator where for example a > b, b > c, c > a