From: Tom de Vries Date: Thu, 17 Aug 2023 08:41:34 +0000 (+0200) Subject: [gdb/build, c++20] Fix invalid conversion in test_symbols X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2b9ed6db3fb08feab70857dc7eb94fbe6a45e069;p=binutils-gdb.git [gdb/build, c++20] Fix invalid conversion in test_symbols When building gdb with -std=c++20, I run into: ... gdb/dwarf2/read.c:2709:3: error: invalid conversion from ‘const char8_t*’ to \ ‘const char*’ [-fpermissive] 2709 | u8"u8função", | ^~~~~~~~~~~~ | | | const char8_t* ... Fix this by making the conversion explicit. Tested on x86_64-linux. --- diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 245117cc1c7..f1d7bfdfdec 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -2706,7 +2706,7 @@ static const char *test_symbols[] = { /* A UTF-8 name with multi-byte sequences to make sure that cp-name-parser understands this as a single identifier ("função" is "function" in PT). */ - u8"u8função", + (const char *)u8"u8função", /* Test a symbol name that ends with a 0xff character, which is a valid character in non-UTF-8 source character sets (e.g. Latin1