From: Michael Chastain Date: Fri, 22 Aug 2003 05:05:56 +0000 (+0000) Subject: 2003-08-21 Michael Chastain X-Git-Tag: ezannoni_pie-20030916-branchpoint~300 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72e5f48470f61a7185897e0c7147d2ae5fa9fde1;p=thirdparty%2Fbinutils-gdb.git 2003-08-21 Michael Chastain * gdbtypes.h: Change array bound type from an int to enum. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 727e0d705bd..d410a3ba946 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2003-08-21 Michael Chastain + + * gdbtypes.h: Change array bound type from an int to enum. + 2003-08-21 Andrew Cagney * 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 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.