aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Chastain <mec@google.com>2003-08-22 05:05:56 +0000
committerMichael Chastain <mec@google.com>2003-08-22 05:05:56 +0000
commit72e5f48470f61a7185897e0c7147d2ae5fa9fde1 (patch)
tree30c3eae6e4de5536dffe02c3df07338a1bd91133
parent435ac2284912cb5b383ad22ca264bb73b308d04a (diff)
downloadgdb-72e5f48470f61a7185897e0c7147d2ae5fa9fde1.zip
gdb-72e5f48470f61a7185897e0c7147d2ae5fa9fde1.tar.gz
gdb-72e5f48470f61a7185897e0c7147d2ae5fa9fde1.tar.bz2
2003-08-21 Michael Chastain <mec@shout.net>
* gdbtypes.h: Change array bound type from an int to enum.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/gdbtypes.h27
2 files changed, 20 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 727e0d7..d410a3b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2003-08-21 Michael Chastain <mec@shout.net>
+
+ * gdbtypes.h: Change array bound type from an int to enum.
+
2003-08-21 Andrew Cagney <cagney@redhat.com>
* config/sparc/tm-sp64.h: Delete #if !GDB_MULTI_ARCH and #if 0 code.
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 554778a..c7036f5 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.