]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/binutils-tumbl.git/commitdiff
merge from gcc
authorDJ Delorie <dj@delorie.com>
Sat, 13 Nov 2010 02:20:29 +0000 (02:20 +0000)
committerDJ Delorie <dj@delorie.com>
Sat, 13 Nov 2010 02:20:29 +0000 (02:20 +0000)
libiberty/ChangeLog
libiberty/cp-demangle.c
libiberty/testsuite/demangle-expected

index 62c60bdc23b608b4259e36bb05be61b6aaeb07c1..8cd4a2856847e81fd968eb71cf74f091f108a921 100644 (file)
@@ -1,3 +1,10 @@
+2010-11-12  Ian Lance Taylor  <iant@google.com>
+
+       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  <rth@redhat.com>
 
        * configure.ac (AC_CHECK_HEADERS): Add process.h.
index 39c8cc0b310393719e8089d9f739102c0d004b8b..8b0b825099e20f2e155c907e6519293eb3db0d21 100644 (file)
@@ -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)
index 0507ce866513a43b2ee15627bed7157e80be6d97..5b154455a01397ee0d9a5b8050582714db721221 100644 (file)
@@ -3325,8 +3325,13 @@ first<Duo>
 #
 --format=gnu-v3 --no-params
 _Z3fooIiFvdEiEvv
-void foo<int, void ()(double), int>()
-foo<int, void ()(double), int>
+void foo<int, void (double), int>()
+foo<int, void (double), int>
+#
+--format=gnu-v3 --no-params
+_Z1fIFvvEEvv
+void f<void ()>()
+f<void ()>
 #
 --format=gnu-v3 --no-params
 _ZN1N1fE