Make two range_bounds bitfields unsigned
authorTom Tromey <tom@tromey.com>
Thu, 28 Nov 2019 03:42:57 +0000 (20:42 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 28 Nov 2019 15:04:10 +0000 (08:04 -0700)
While debugging gdb, I noticed that the bitfields in a range_bounds
were signed, causing the values of these fields to be -1.

I think this is odd; and while we haven't yet committed to boolean
bitfields, I think it is a small improvement to change these types to
unsigned.

gdb/ChangeLog
2019-11-28  Tom Tromey  <tom@tromey.com>

* gdbtypes.h (struct range_bounds) <flag_upper_bound_is_count,
flag_bound_evaluated>: Now unsigned.

Change-Id: Ia377fd931594bbf8653180d4dcb4e60354d90139

gdb/ChangeLog
gdb/gdbtypes.h

index ce8286af9801db9866fc1f88a148666e2ca2e022..c777def757b0c46f1db7d89d067f252fa9741bfb 100644 (file)
@@ -1,3 +1,8 @@
+2019-11-28  Tom Tromey  <tom@tromey.com>
+
+       * gdbtypes.h (struct range_bounds) <flag_upper_bound_is_count,
+       flag_bound_evaluated>: Now unsigned.
+
 2019-11-28  Tom Tromey  <tom@tromey.com>
 
        * guile/guile-internal.h (vlscm_scm_from_value_unsafe): Don't
index 8fc770c5d39ce26033b802b06640002811be14b1..2e128aae063f9dec3802cb893e146c06ddd53fc1 100644 (file)
@@ -631,12 +631,12 @@ struct range_bounds
   /* True if HIGH range bound contains the number of elements in the
      subrange.  This affects how the final high bound is computed.  */
 
-  int flag_upper_bound_is_count : 1;
+  unsigned int flag_upper_bound_is_count : 1;
 
   /* True if LOW or/and HIGH are resolved into a static bound from
      a dynamic one.  */
 
-  int flag_bound_evaluated : 1;
+  unsigned int flag_bound_evaluated : 1;
 };
 
 /* Compare two range_bounds objects for equality.  Simply does
This page took 0.031224 seconds and 4 git commands to generate.