[rfa] space reduction in gdbtypes.h
Andrew Cagney
ac131313@redhat.com
Thu Aug 21 04:04:00 GMT 2003
> /* FIXME, these should probably be restricted to a Fortran-specific
> field in some fashion. */
> #define BOUND_CANNOT_BE_DETERMINED 5
> @@ -306,8 +306,8 @@
> #define BOUND_BY_REF_IN_REG 2
> #define BOUND_BY_VALUE_IN_REG 1
> #define BOUND_SIMPLE 0
> - int upper_bound_type;
> - int lower_bound_type;
> + int upper_bound_type : 4;
> + int lower_bound_type : 4;
Hmm, doesn't this part scream ENUM? Without that the packing is unsafe:
adding an extra variant that overflows the field won't be detected;
compilers capable of checking enum assignments won't do anything useful.
enjoy,
Andrew
More information about the Gdb-patches
mailing list