summaryrefslogtreecommitdiff
path: root/libiberty/cp-demangle.c
diff options
context:
space:
mode:
authorKamlesh Kumar <kamleshbhalui@gmail.com>2019-11-04 23:24:25 +0000
committerJason Merrill <jason@gcc.gnu.org>2019-11-04 18:24:25 -0500
commite0c866ddfdb500cacefee4e37fb3e85521c55623 (patch)
tree97bd2e1b1e838cc820f21aaee225bf416616c1e3 /libiberty/cp-demangle.c
parent04373f9288435fa2980dda99ad988fa5ce99331a (diff)
PR c++/91979 - mangling nullptr expression
2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com> gcc/cp * cp/mangle.c (write_template_arg_literal): Handle nullptr mangling. gcc * common.opt (-fabi-version): Document =14. * doc/invoke.texi (C++ Dialect Options): Likewise. gcc/c-family * c-opts.c (c_common_post_options): Update latest_abi_version. libiberty * cp-demangle.c (d_expr_primary): Handle nullptr demangling. * testsuite/demangle-expected: Added test. From-SVN: r277801
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r--libiberty/cp-demangle.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 5b674d7d93c..963217c37bd 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -3577,6 +3577,17 @@ d_expr_primary (struct d_info *di)
&& type->u.s_builtin.type->print != D_PRINT_DEFAULT)
di->expansion -= type->u.s_builtin.type->len;
+ if (type->type == DEMANGLE_COMPONENT_BUILTIN_TYPE
+ && strcmp (type->u.s_builtin.type->name,
+ cplus_demangle_builtin_types[33].name) == 0)
+ {
+ if (d_peek_char (di) == 'E')
+ {
+ d_advance (di, 1);
+ return type;
+ }
+ }
+
/* Rather than try to interpret the literal value, we just
collect it as a string. Note that it's possible to have a
floating point literal here. The ABI specifies that the