http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51397
Bug #: 51397 Summary: static_assert message formatting Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: d...@boost-consulting.com I just noticed that GCC can be overly-helpful ;-) when formatting a static assertion message: static_assert('X' != '\130',"'X' has the wrong value"); gives me error: static assertion failed: "\'X\' has the wrong value" I suggest that GCC should drop the surrounding quotes and not try to escape any characters in the message. Otherwise, things like #define static_assert_(x) static_assert(x, #x) static_assert_('X' != '\130') turn out quite badly. The point of this facility is, after all, to help programmers report legible errors!