]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Implement C++14 numeric separators
authorTom Tromey <tom@tromey.com>
Sat, 20 Apr 2024 02:22:11 +0000 (20:22 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 14 May 2024 19:28:40 +0000 (13:28 -0600)
commita4b7c5f5cda16795dd8be11494e8f1b5de21d69f
tree793808a959af265d3e86677a8334aff6f3cd3c98
parent383a3d99c361ff66b9b5bceb28c0ab9485cd1789
Implement C++14 numeric separators

C++14 allows the use of the apostrophe as a numeric separator; that
is, "23000" and "23'000" represent the same number.  This patch
implements this for gdb's C++ parser and the C++ name canonicalizer.

I did this unconditionally for all C variants because I think it's
unambiguous.

For the name canonicalizer, there's at least one compiler that can
emit constants with this form, see bug 30845.

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