diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 62c60bdc23b..8cd4a285684 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,10 @@ +2010-11-12 Ian Lance Taylor + + PR other/46332 + * cp-demangle.c (d_print_function_type): Don't print parentheses + if there are no modifiers to print. + * testsuite/demangle-expected: Tweak one test case, add another. + 2010-11-04 Richard Henderson * configure.ac (AC_CHECK_HEADERS): Add process.h. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 39c8cc0b310..8b0b825099e 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -4546,20 +4546,17 @@ d_print_function_type (struct d_print_info *dpi, struct d_print_mod *mods) { int need_paren; - int saw_mod; int need_space; struct d_print_mod *p; struct d_print_mod *hold_modifiers; need_paren = 0; - saw_mod = 0; need_space = 0; for (p = mods; p != NULL; p = p->next) { if (p->printed) break; - saw_mod = 1; switch (p->mod->type) { case DEMANGLE_COMPONENT_POINTER: @@ -4588,9 +4585,6 @@ d_print_function_type (struct d_print_info *dpi, break; } - if (d_left (dc) != NULL && ! saw_mod) - need_paren = 1; - if (need_paren) { if (! need_space) diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index 0507ce86651..5b154455a01 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -3325,8 +3325,13 @@ first # --format=gnu-v3 --no-params _Z3fooIiFvdEiEvv -void foo() -foo +void foo() +foo +# +--format=gnu-v3 --no-params +_Z1fIFvvEEvv +void f() +f # --format=gnu-v3 --no-params _ZN1N1fE diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a82999b2c7d..f5a97b3be7e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2010-11-12 Ian Lance Taylor + + PR other/46332 + * testsuite/abi/demangle/abi_examples/14.cc (main): Change + expected demangling. + 2010-11-11 Paolo Carlini * include/bits/move.h (forward): Implement N3143, resolving US 90. diff --git a/libstdc++-v3/testsuite/abi/demangle/abi_examples/14.cc b/libstdc++-v3/testsuite/abi/demangle/abi_examples/14.cc index 010e469a457..98b99878683 100644 --- a/libstdc++-v3/testsuite/abi/demangle/abi_examples/14.cc +++ b/libstdc++-v3/testsuite/abi/demangle/abi_examples/14.cc @@ -33,7 +33,7 @@ int main() template void foo(); */ //demangle("_Z3fooIiPFidEiEvv", "void foo(void)"); - verify_demangle("_Z3fooIiFvdEiEvv", "void foo()"); + verify_demangle("_Z3fooIiFvdEiEvv", "void foo()"); return 0; }