.
[deliverable/binutils-gdb.git] / gdb / c-typeprint.c
index b1e3019d8574fd5910b01d989edd712c661a759e..2d2ad850c3f162f28729f2e6d947c3dd85f83137 100644 (file)
@@ -65,7 +65,7 @@ void
 c_print_type (struct type *type, char *varstring, struct ui_file *stream,
              int show, int level)
 {
-  register enum type_code code;
+  enum type_code code;
   int demangled_args;
   int need_post_space;
 
@@ -284,6 +284,7 @@ c_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
     case TYPE_CODE_BITSTRING:
     case TYPE_CODE_COMPLEX:
     case TYPE_CODE_TEMPLATE:
+    case TYPE_CODE_NAMESPACE:
       /* These types need no prefix.  They are listed here so that
          gcc -Wall will reveal any types that haven't been handled.  */
       break;
@@ -624,6 +625,7 @@ c_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
     case TYPE_CODE_BITSTRING:
     case TYPE_CODE_COMPLEX:
     case TYPE_CODE_TEMPLATE:
+    case TYPE_CODE_NAMESPACE:
       /* These types do not need a suffix.  They are listed so that
          gcc -Wall will report types that may not have been considered.  */
       break;
@@ -857,10 +859,11 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
              QUIT;
              /* Don't print out virtual function table.  */
              /* HP ANSI C++ case */
-             if (TYPE_HAS_VTABLE (type) && (STREQN (TYPE_FIELD_NAME (type, i), "__vfp", 5)))
+             if (TYPE_HAS_VTABLE (type)
+                 && (strncmp (TYPE_FIELD_NAME (type, i), "__vfp", 5) == 0))
                continue;
              /* Other compilers */
-             if (STREQN (TYPE_FIELD_NAME (type, i), "_vptr", 5)
+             if (strncmp (TYPE_FIELD_NAME (type, i), "_vptr", 5) == 0
                  && is_cplus_marker ((TYPE_FIELD_NAME (type, i))[5]))
                continue;
 
@@ -942,7 +945,7 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
              int j, len2 = TYPE_FN_FIELDLIST_LENGTH (type, i);
              char *method_name = TYPE_FN_FIELDLIST_NAME (type, i);
              char *name = type_name_no_tag (type);
-             int is_constructor = name && STREQ (method_name, name);
+             int is_constructor = name && strcmp (method_name, name) == 0;
              for (j = 0; j < len2; j++)
                {
                  char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
@@ -1182,6 +1185,11 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
        }
       break;
 
+    case TYPE_CODE_NAMESPACE:
+      fputs_filtered ("namespace ", stream);
+      fputs_filtered (TYPE_TAG_NAME (type), stream);
+      break;
+
     default:
       /* Handle types not explicitly handled by the other cases,
          such as fundamental types.  For these, just print whatever
This page took 0.027838 seconds and 4 git commands to generate.