This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] add FALLTHROUGH comment in ada-exp.y:write_object_renaming
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Mon, 28 Feb 2011 08:39:20 +0400
- Subject: [commit] add FALLTHROUGH comment in ada-exp.y:write_object_renaming
- References: <4D696633.9090207@vmware.com>
Actually, I looked at the code again, and matched it against the specs
(in GCC: ada/exp_dbug.ads), and it seemed to be correct. We might have
been able to write the code a little differently, but we need the
state-machine thingy because, for some reason, XS<number> has a different
meaning depending on whether it is preceded by an XL<number> or not.
It would have been simpler if we used XS<number> purely for subscripting
and then XU<number> for encoding the upper bound of the slice. But we're
stuck with old decisions, now (that was BMT).
I took the liberty of committing this patch, since Michael's patch
did not have a ChangeLog:
gdb/ChangeLog:
From Michael Snyder <msnyder@vmware.com>
* ada-exp.y (write_object_renaming): Add FALLTHROUGH comment.
Checked in.
---
gdb/ChangeLog | 5 +++++
gdb/ada-exp.y | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 041543b..682c9f1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-28 Joel Brobecker <brobecker@adacore.com>
+
+ From Michael Snyder <msnyder@vmware.com>
+ * ada-exp.y (write_object_renaming): Add FALLTHROUGH comment.
+
2011-02-27 Michael Snyder <msnyder@vmware.com>
* objc-lang.c (selectors_info): Prevent string overrun.
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index e56b7bc..e64d1eb 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -920,6 +920,7 @@ write_object_renaming (struct block *orig_left_context,
break;
case 'L':
slice_state = LOWER_BOUND;
+ /* FALLTHROUGH */
case 'S':
renaming_expr += 1;
if (isdigit (*renaming_expr))
--
1.7.1