changes, what else?
[deliverable/binutils-gdb.git] / gdb / gdbtypes.h
index 5aaf73ba69d17e0236cdbc916bc1bdcc1316fdd4..b7b991787174b9b7c9bf1121afbde1560a5a1447 100644 (file)
@@ -83,6 +83,12 @@ enum type_code
   TYPE_CODE_BOOL               /* Builtin Modula-2 BOOLEAN */
 };
 
+/* For now allow source to use TYPE_CODE_CLASS for C++ classes, as an
+   alias for TYPE_CODE_STRUCT.  Eventually these should probably be
+   officially distinct types within gdb. */
+
+#define TYPE_CODE_CLASS TYPE_CODE_STRUCT
+
 /* Some bits for the type's flags word. */
 
 /* Explicitly unsigned integer type */
@@ -429,6 +435,7 @@ allocate_cplus_struct_type PARAMS ((struct type *));
        B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (n))
 
 #define TYPE_FIELD_STATIC(thistype, n) ((thistype)->fields[n].bitpos == -1)
+#define TYPE_FIELD_NESTED(thistype, n) ((thistype)->fields[n].bitpos == -2)
 #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) ((char *)(thistype)->fields[n].bitsize)
 
 #define TYPE_FN_FIELDLISTS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists
@@ -517,9 +524,9 @@ extern struct type *builtin_type_m2_bool;
    the same as for the type structure. */
 
 #define TYPE_ALLOC(t,size)  \
-   TYPE_OBJFILE (t) != NULL  \
+   (TYPE_OBJFILE (t) != NULL  \
     ? obstack_alloc (&TYPE_OBJFILE (t) -> type_obstack, size) \
-    : xmalloc (size)
+    : xmalloc (size))
 
 extern struct type *
 alloc_type PARAMS ((struct objfile *));
This page took 0.0234 seconds and 4 git commands to generate.