+
+ 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.
+
* configure.ac (AC_CHECK_HEADERS): Add process.h.
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:
break;
}
- if (d_left (dc) != NULL && ! saw_mod)
- need_paren = 1;
-
if (need_paren)
{
if (! need_space)
#
--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