+2019-10-07 Christian Biesinger <cbiesinger@google.com>
+
+ * charset.c (your_gdb_wchar_t_is_bogus): Replace with a
+ gdb_static_assert.
+
2019-10-07 Weimin Pan <weimin.pan@oracle.com>
* ../Makefile.def (dependencies): Add all-libctf to all-gdb
#define ENDIAN_SUFFIX "LE"
#endif
-/* The code below serves to generate a compile time error if
- gdb_wchar_t type is not of size 2 nor 4, despite the fact that
- macro __STDC_ISO_10646__ is defined.
- This is better than a gdb_assert call, because GDB cannot handle
- strings correctly if this size is different. */
-
-extern char your_gdb_wchar_t_is_bogus[(sizeof (gdb_wchar_t) == 2
- || sizeof (gdb_wchar_t) == 4)
- ? 1 : -1];
+/* GDB cannot handle strings correctly if this size is different. */
+
+gdb_static_assert (sizeof (gdb_wchar_t) == 2 || sizeof (gdb_wchar_t) == 4);
/* intermediate_encoding returns the charset used internally by
GDB to convert between target and host encodings. As the test above