C++ Logo


Advanced search

Subject: Undefining a compiler 's predefined macro
From: Edward Diener (eldlistmailingz_at_[hidden])
Date: 2020-03-22 05:12:19

Is it valid C++ to undefine a compiler's predefined macro ? According to
the C++ standard, in 19.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.

But if a compiler has a documented predefined macro which is not in the
subclause is it valid C++ to undefine that macro, and must a C++
standard conforming compiler allow it ?

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups