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] |
Andrew C says:
#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?
I agree, it does, but I wanted to patch one thing at a time, so I left it as an int.
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.
Well, the definitions are right next to the use, which would make it obvious.
Would you like me to go ahead and make this an enum right now?
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |