https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70196
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid Known to fail| |4.9.3, 5.3.0, 6.0 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- All supported versions behave this way. This is also not specific to constexpr but a more general issue. Below is a test case that doesn't involve constexpr. $ cat v.c && /home/msebor/build/gcc-trunk-svn/gcc/xgcc -B/home/msebor/build/gcc-trunk-svn/gcc -S -Wall -Wextra -Wpedantic -o/dev/null -std=c++11 -xc++ v.c extern __attribute__ ((weak)) int i; template <bool> struct S { }; S<!(&i < 0)> s0; // accepted S<&i == 0> s1; // rejected v.c:5:10: warning: ordered comparison of pointer with integer zero [-Wextra] S<!(&i < 0)> s0; // accepted ^ v.c:6:10: error: template argument 1 is invalid S<&i == 0> s1; // rejected ^