On Wed, Jul 10, 2019 at 2:34 AM Florian Weimer wrote: > * Szabolcs Nagy: > > > it is clear that 0L is a conforming definition for all > > conforming c++ compilers. > > > > it is less clear if __null is so in all compilers that > > define __GNUC__. > > Why wouldn't something like this be valid for current C++ versions? > > static inline constexpr decltype(nullptr) __null{}; > #define NULL __null > > I don't see a requirement that NULL must be an expression that can be > evaluated by the preprocessor. Is this just for the purposes of argument, or, why would you want to do that? More sanely, yes, `#define NULL nullptr` would now also be a conforming definition, but that is an undesirable change in practice for a variety of compatibility reasons. Toolchains have remained with `#define NULL __null`, and seem likely to continue to do so indefinitely. I feel like this thread is kinda going off on a tangent now. Inventing new and unique ways to define NULL in C++ doesn't really seem a useful thing to do be doing here...