gdb.base/charset.{c,exp} C++ify
authorPedro Alves <pedro@palves.net>
Thu, 17 Sep 2020 22:33:41 +0000 (23:33 +0100)
committerPedro Alves <pedro@palves.net>
Thu, 17 Sep 2020 23:05:57 +0000 (00:05 +0100)
commitc3e5138dccad66deda24fadb831f27881fa64b2d
tree2c9f58ddd552e5ef582c4ae55bd322f02aab87bc
parent151fdbad7a4df43fb7e5b1ef2f84622aaaa2ddb5
gdb.base/charset.{c,exp} C++ify

Adjust gdb.base/charset.{c,exp} so that the testcase works when
compiled as a C++ program.

wchar_t is built-in in C++, so don't make a phony typedef.

The "print /d" is so that we also get "1" instead of "true" in C++
mode.

gdb/testsuite/ChangeLog:

* gdb.base/charset.c [__cplusplus] (wchar_t, char16_t, char32_t):
Don't define.
(utf_32_string): Compile for both C and C++.
* gdb.base/charset.exp: Use "print /d".
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/charset.c
gdb/testsuite/gdb.base/charset.exp