* gdb.base/display.c (do_loops): Add float variable `f'.
[deliverable/binutils-gdb.git] / gdb / c-typeprint.c
index bdc5a689ee1dc8ffed41c421399d839102dad529..789d5f0b2df0594e2e62b2e9b8dd6016f195201a 100644 (file)
 #include "value.h"
 #include "gdbcore.h"
 #include "target.h"
-#include "command.h"
-#include "gdbcmd.h"
 #include "language.h"
 #include "demangle.h"
 #include "c-lang.h"
 #include "typeprint.h"
+#include "cp-abi.h"
 
 #include "gdb_string.h"
 #include <errno.h>
@@ -295,7 +294,11 @@ c_type_print_cv_qualifier (struct type *type, struct ui_file *stream,
 {
   int flag = 0;
 
-  if (TYPE_CONST (type))
+  /* We don't print `const' qualifiers for references --- since all
+     operators affect the thing referenced, not the reference itself,
+     every reference is `const'.  */
+  if (TYPE_CONST (type)
+      && TYPE_CODE (type) != TYPE_CODE_REF)
     {
       if (need_pre_space)
        fprintf_filtered (stream, " ");
@@ -902,11 +905,10 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
                {
                  char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
                  int is_full_physname_constructor =
-                 ((physname[0] == '_' && physname[1] == '_'
-                   && strchr ("0123456789Qt", physname[2]))
-                  || STREQN (physname, "__ct__", 6)
-                  || DESTRUCTOR_PREFIX_P (physname)
-                  || STREQN (physname, "__dt__", 6));
+                  is_constructor_name (physname) 
+                  || is_destructor_name (physname)
+                  || method_name[0] == '~';
+
 
                  QUIT;
                  if (TYPE_FN_FIELD_PROTECTED (f, j))
This page took 0.024776 seconds and 4 git commands to generate.