This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa] space reduction in gdbtypes.h


   /* 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]