Undefined behavior for the test that #define defined

According to Clause 16.8.4, "If any of the pre-defined macro names in this subclause, or the identifier defined, is the subject of a #define or a #undef preprocessing directive, the behavior is undefined."
So I think these tests are undefined behavior.