GCC accepts this ill-formed code: void f(int n) { static_assert((+n, true), ""); } This is invalid because it reads the variable 'n', whose value is not known within the constant expression.