Created attachment 50443 [details] Temp file for provided source The following program is valid in all versions of GCC from 4.7.1 through trunk[1]. Relational operations on std::nullptr_t don't really make sense since there's only one value. ``` auto lt = nullptr < nullptr; auto gt = nullptr > nullptr; auto le = nullptr <= nullptr; auto ge = nullptr >= nullptr; ``` This was apparently addressed by DR583/N3478 (thanks to Richard Smith for providing these). [1]: https://godbolt.org/z/h11183 # Versions * All GCC releases at least as far back as 4.7.1 (where I stopped looking). # System type * Debian (checked GCC 10.2.1) * Compiler Explorer (checked all other reported versions). # Options given to GCC `g++ -save-temps nullptr-relop.cpp -c -std=c++20`
Mine (for GCC 12).
Fixed in GCC 12.