From 4682b6fe285dd8c2cb48e96189e1aee558d96b17 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 6 Oct 2008 22:29:42 +0000 Subject: gcc/cp/: PR c++/37376, other mangling issues * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling. (write_member_name): Break out from... (write_expression): ...here. Handle dependent COMPONENT_REF. (write_template_arg): Wrap an argument pack in 'I'/'E'. (write_builtin_type): Update char16/32_t mangling. (write_nested_name, write_prefix): Don't forget template args for typename types. * operators.def: Add ARROW_EXPR, update COMPONENT_REF and EXPR_PACK_EXPANSION. libstdc++-v3/: * config/abi/pre/gnu.ver: Update char16/32_t manglings. include/: * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_PACK_EXPANSION. libiberty/: * cp-demangle.c (struct d_print_info): Add pack_index. (d_dump): Add DEMANGLE_COMPONENT_PACK_EXPANSION. (d_make_comp): Likewise. DEMANGLE_COMPONENT_ARGLIST and DEMANGLE_COMPONENT_TEMPLATE_ARGLIST can have two null args. (cplus_demangle_builtin_types): Add char16/32_t. (cplus_demangle_type): Recognize them. (d_template_args): Handle empty argument packs. (d_template_arg): Handle argument packs. (d_expression): Handle dependent name. (d_index_template_argument): New fn. (d_lookup_template_argument): New fn. (d_find_pack, d_pack_length): New fn. (d_print_subexpr): Split out... (d_print_comp): ...from here. Use d_*_template_argument. Handle empty arg lists. Support pack expansions. * cp-demangle.h (D_BUILTIN_TYPE_COUNT): Increase to 32. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140916 138bc75d-0d04-0410-961f-82ee72b054a4 --- libiberty/testsuite/demangle-expected | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'libiberty/testsuite/demangle-expected') diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index 9358204d2bd..d9efbc0d24e 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -3345,7 +3345,7 @@ f # --format=gnu-v3 --no-params _ZngILi42EEvN1AIXplT_Li2EEE1TE -void operator-<42>(A<(42) + (2)>::T) +void operator-<42>(A<(42)+(2)>::T) operator-<42> # --format=gnu-v3 --no-params @@ -3385,7 +3385,7 @@ int* const volatile restrict _far # --format=gnu-v3 --no-params _Z3fooILi2EEvRAplT_Li1E_i -void foo<2>(int (&) [(2) + (1)]) +void foo<2>(int (&) [(2)+(1)]) foo<2> # --format=gnu-v3 --no-params @@ -3612,13 +3612,13 @@ hairyfunc5 # This is from gcc PR 8861 --format=gnu-v3 --no-params _Z1fILi1ELc120EEv1AIXplT_cviLd810000000000000000703DAD7A370C5EEE -void f<1, (char)120>(A<(1) + ((int)((double)[810000000000000000703DAD7A370C5]))>) +void f<1, (char)120>(A<(1)+((int)((double)[810000000000000000703DAD7A370C5]))>) f<1, (char)120> # # This is also from gcc PR 8861 --format=gnu-v3 --no-params _Z1fILi1EEv1AIXplT_cvingLf3f800000EEE -void f<1>(A<(1) + ((int)(-((float)[3f800000])))>) +void f<1>(A<(1)+((int)(-((float)[3f800000])))>) f<1> # # This is from a libstdc++ debug mode patch. @@ -3643,7 +3643,7 @@ f # confusion with the '>' which ends the template parameters. --format=gnu-v3 --no-params _Z4dep9ILi3EEvP3fooIXgtT_Li2EEE -void dep9<3>(foo<((3) > (2))>*) +void dep9<3>(foo<((3)>(2))>*) dep9<3> # # Watch out for templated version of `operator<'--it needs an extra @@ -3885,16 +3885,20 @@ java resource java/util/iso4217.properties # decltype/param placeholder test --format=gnu-v3 _Z3addIidEDTplsTT_sTT0_ES0_S1_ -decltype ((int) + (double)) add(int, double) -# decltype/T() test ---format=gnu-v3 -_Z4add2IidEDTplcvT_vcvT0_vES0_S1_ -decltype (((int)()) + ((double)())) add2(int, double) +decltype ((int)+(double)) add(int, double) # decltype/fn call test --format=gnu-v3 _Z4add3IidEDTclL_Z1gEsTT_sTT0_EES0_S1_ -decltype (g (int, double)) add3(int, double) -# Extended floating point types test +decltype (g(int, double)) add3(int, double) +# new (2008) built in types test +--format=gnu-v3 +_Z1fDfDdDeDhDsDi +f(decimal32, decimal64, decimal128, half, char16_t, char32_t) +# pack expansion test +--format=gnu-v3 +_Z1fIIPiPfPdEEvDpT_ +void f(int*, float*, double*) +# '.' test --format=gnu-v3 -_Z1fDfDdDeDh -f(decimal32, decimal64, decimal128, half) +_Z1hI1AIiEdEDTcldtsTT_1gIT0_EEES2_S3_ +decltype (((A).(g))()) h, double>(A, double) -- cgit v1.2.1