c++/8218: Destructors w/arguments.
[deliverable/binutils-gdb.git] / gdb / c-typeprint.c
index 75f6d61e907c38ef9986b4c00921b32eb2bc715c..b97216eabeaebbb36f3228d111b9e459f9714273 100644 (file)
@@ -226,13 +226,21 @@ cp_type_print_method_args (struct type *mtype, const char *prefix,
                           language_cplus, DMGL_ANSI);
   fputs_filtered ("(", stream);
 
-  /* Skip the class variable.  */
+  /* Skip the class variable.  We keep this here to accommodate older
+     compilers and debug formats which may not support artificial
+     parameters.  */
   i = staticp ? 0 : 1;
   if (nargs > i)
     {
       while (i < nargs)
        {
-         c_print_type (args[i++].type, "", stream, 0, 0, flags);
+         struct field arg = args[i++];
+
+         /* Skip any artificial arguments.  */
+         if (FIELD_ARTIFICIAL (arg))
+           continue;
+
+         c_print_type (arg.type, "", stream, 0, 0, flags);
 
          if (i == nargs && varargs)
            fprintf_filtered (stream, ", ...");
This page took 0.0301 seconds and 4 git commands to generate.