]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix C++ name canonicalizations of character literals
authorTom Tromey <tom@tromey.com>
Wed, 10 Apr 2024 22:49:51 +0000 (16:49 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 14 May 2024 19:28:39 +0000 (13:28 -0600)
commit843d1820007ce64f5a69a64102a6607dcff2ce27
tree76d9ff368240b554fc85aa349a0aa3b65c9e6ea9
parent6921816e5ecdf5ef01db2b96a4f744476752332b
Fix C++ name canonicalizations of character literals

The names "void C<(char)1>::m()" and "void C<'\001'>::m()" should
canonicalize to the same string, but currently they do not -- the
former remains unchanged and the latter is transformed to
"void C<(char)'\001'>::m()".

This patch fixes the bug and also adds some unit tests.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16843
Approved-By: John Baldwin <jhb@FreeBSD.org>
gdb/cp-name-parser.y