This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix unintended fall-through in dump_subexp_body_standard
- From: Tom Tromey <tromey at redhat dot com>
- To: ppluzhnikov at google dot com (Paul Pluzhnikov)
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 02 Mar 2009 17:24:20 -0700
- Subject: Re: [patch] Fix unintended fall-through in dump_subexp_body_standard
- References: <20090303001329.541223A6B9B@localhost>
- Reply-to: tromey at redhat dot com
>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:
Paul> The code currently in dump_subexp_body_standard() looks "obviously
Paul> wrong" to me, but perhaps I am missing something ...
I think it is intended.
Paul> case TERNOP_SLICE:
Paul> case TERNOP_SLICE_COUNT:
Paul> elt = dump_subexp (exp, stream, elt);
This prints the first element of a node with 3 operands.
dump_subexp returns the index of the following element.
Then it falls through to the code to print a node with 2 operands.
Likewise the 2 operand code falls through to the 1 operand case.
Tom