summaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.h
diff options
context:
space:
mode:
authorMichael Chastain <mec.gnu@mindspring.com>2003-08-22 05:05:56 +0000
committerMichael Chastain <mec.gnu@mindspring.com>2003-08-22 05:05:56 +0000
commit2e594efb928344ac8c0d3e424e3c69f75692762c (patch)
tree43cdff1d468fc9e008a1716a6ea89b5c9c4138fb /gdb/gdbtypes.h
parent4425596f3e4e9211faa3baf4bedfe9f976694f7a (diff)
downloadgdb-2e594efb928344ac8c0d3e424e3c69f75692762c.tar.gz
2003-08-21 Michael Chastain <mec@shout.net>
* gdbtypes.h: Change array bound type from an int to enum.
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r--gdb/gdbtypes.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 554778af40b..c7036f5c814 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -272,6 +272,17 @@ enum type_code
#define TYPE_ADDRESS_CLASS_ALL(t) (TYPE_INSTANCE_FLAGS(t) \
& TYPE_FLAG_ADDRESS_CLASS_ALL)
+/* Array bound type. */
+enum array_bound_type
+{
+ BOUND_SIMPLE = 0,
+ BOUND_BY_VALUE_IN_REG,
+ BOUND_BY_REF_IN_REG,
+ BOUND_BY_VALUE_ON_STACK,
+ BOUND_BY_REF_ON_STACK,
+ BOUND_CANNOT_BE_DETERMINED
+};
+
/* This structure is space-critical.
Its layout has been tweaked to reduce the space used. */
@@ -281,17 +292,11 @@ struct main_type
ENUM_BITFIELD(type_code) code : 8;
- /* These fields appear at this location because they pack nicely here. */
- /* FIXME, these should probably be restricted to a Fortran-specific
- field in some fashion. */
-#define BOUND_CANNOT_BE_DETERMINED 5
-#define BOUND_BY_REF_ON_STACK 4
-#define BOUND_BY_VALUE_ON_STACK 3
-#define BOUND_BY_REF_IN_REG 2
-#define BOUND_BY_VALUE_IN_REG 1
-#define BOUND_SIMPLE 0
- int upper_bound_type : 4;
- int lower_bound_type : 4;
+ /* Array bounds. These fields appear at this location because
+ they pack nicely here. */
+
+ ENUM_BITFIELD(array_bound_type) upper_bound_type : 4;
+ ENUM_BITFIELD(array_bound_type) lower_bound_type : 4;
/* Name of this type, or NULL if none.