This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix build failure with GCC 4.1.
- From: Tom Tromey <tromey at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 18 May 2016 17:19:35 -0000
- Subject: [binutils-gdb] Fix build failure with GCC 4.1.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=45f4ed92d14ddf891be1470556f53de6c94c8dc2
commit 45f4ed92d14ddf891be1470556f53de6c94c8dc2
Author: Tom Tromey <tom@tromey.com>
Date: Wed May 18 10:48:41 2016 -0600
Fix build failure with GCC 4.1.
2016-05-18 Tom Tromey <tom@tromey.com>
* rust-lang.c (rust_subscript): Initialize "high".
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/rust-lang.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 188a2db..92024b6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2016-05-18 Tom Tromey <tom@tromey.com>
+
+ * rust-lang.c (rust_subscript): Initialize "high".
+
2016-05-17 Simon Marchi <simon.marchi@ericsson.com>
PR gdb/20045
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
index b8af166..5df99ce 100644
--- a/gdb/rust-lang.c
+++ b/gdb/rust-lang.c
@@ -1308,9 +1308,10 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
{
struct value *lhs, *rhs, *result;
struct type *rhstype;
- LONGEST low, high, high_bound;
+ LONGEST low, high_bound;
/* Initialized to appease the compiler. */
enum range_type kind = BOTH_BOUND_DEFAULT;
+ LONGEST high = 0;
int want_slice = 0;
++*pos;