aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-11-27 20:42:57 -0700
committerTom Tromey <tom@tromey.com>2019-11-28 08:04:10 -0700
commitbab05c83ac4333bb087a41f843af0e66218ec054 (patch)
tree79b9e6379085d130a1c9d9e89980459dd6d8292c
parent2522f049dfad1c5dcaa641bf41341e0c5bbeca2b (diff)
downloadgdb-bab05c83ac4333bb087a41f843af0e66218ec054.zip
gdb-bab05c83ac4333bb087a41f843af0e66218ec054.tar.gz
gdb-bab05c83ac4333bb087a41f843af0e66218ec054.tar.bz2
Make two range_bounds bitfields unsigned
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
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdbtypes.h4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ce8286a..c777def 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
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
declare.
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 8fc770c..2e128aa 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -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