https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80886
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This has nothing to do with __builtin_constant_p really. Just GCC started to rejecting: constexpr void *phardware {((void *) 0x1000)}; Starting in GCC 7; it was accepted before. What is interesting is the __builtin_constant_p makes clang accept it but that is a clang bug. >This use appears to be documented I don't think it was ever documented to be accepted this way but I could be wrong.