https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61660
--- Comment #3 from Udo Steinberg <us15 at os dot inf.tu-dresden.de> --- Created attachment 33035 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33035&action=edit Testcase 2 Then, similar to this new test case, I would expect something like the following: g++ -std=gnu++11 foo.cc -o foo foo.cc: In function 'void check_type(unsigned int, unsigned int)': foo.cc:10:17: error: non-constant condition for static assertion case 0: static_assert (s == sizeof (uint16), "must use 16bit type"); break; ^ foo.cc:10:17: error: 's' is not a constant expression If the compiler does not treat 'x' in the first test case as a constant, it would be good to issue a warning like it does for 's' in the second test case.