aboutsummaryrefslogtreecommitdiff
path: root/gdb/procfs.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-11-28 12:55:33 +0100
committerTom de Vries <tdevries@suse.de>2025-11-28 12:55:33 +0100
commitf8e4eb6aaac16c42d44fa2580e59bc8017c80cef (patch)
tree6e0937bbcb5ffef70fd38ef2f30826b7e4143b4e /gdb/procfs.c
parent09aeeb1ca9cf28d4ca297299881168ac06dd562e (diff)
downloadbinutils-f8e4eb6aaac16c42d44fa2580e59bc8017c80cef.zip
binutils-f8e4eb6aaac16c42d44fa2580e59bc8017c80cef.tar.gz
binutils-f8e4eb6aaac16c42d44fa2580e59bc8017c80cef.tar.bz2
[gdb/build, c++20] Fix UTF-8 string literal usage
PR build/33675 reports a build breaker: ... top.c: In function ‘void box_one_message(ui_file*, std::string, int)’: top.c:1368:35: error: conditional expression between distinct pointer types \ ‘const char8_t*’ and ‘const char*’ lacks a cast 1368 | const char *wall = emojis_ok () ? u8"\u2503" : "|"; | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ ... The problem is that UTF-8 string literals have type: - const char[N] (until C++20), or - const char8_t[N] (since C++20) Fix this by assigning to variables: ... static const char bd_heavy_vertical[] = u8"\u2503"; ... and using the variables instead. Tested by rebuilding on x86_64-linux, and starting gdb and checking the welcome message box. Reviewed-By: Guinevere Larsen <guinevere@redhat.com> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33675
Diffstat (limited to 'gdb/procfs.c')
0 files changed, 0 insertions, 0 deletions