* [commit] Document that case statement fall-through is intentional.
@ 2011-02-26 22:06 Michael Snyder
2011-02-26 22:40 ` Mark Kettenis
0 siblings, 1 reply; 3+ messages in thread
From: Michael Snyder @ 2011-02-26 22:06 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 101 bytes --]
Tested with "set debug expression 1" -- and I'm telling you, it took me
a while to figure THAT out!
[-- Attachment #2: dump.txt --]
[-- Type: text/plain, Size: 932 bytes --]
2011-02-26 Michael Snyder <msnyder@vmware.com>
* expprint.c (dump_subexp_body_standard): Document that case
statement is meant to fall through.
Index: expprint.c
===================================================================
RCS file: /cvs/src/src/gdb/expprint.c,v
retrieving revision 1.50
diff -u -p -u -p -r1.50 expprint.c
--- expprint.c 1 Feb 2011 18:56:34 -0000 1.50
+++ expprint.c 26 Feb 2011 21:48:49 -0000
@@ -767,6 +767,7 @@ dump_subexp_body_standard (struct expres
case TERNOP_SLICE:
case TERNOP_SLICE_COUNT:
elt = dump_subexp (exp, stream, elt);
+ /* FALL THROUGH */
case BINOP_ADD:
case BINOP_SUB:
case BINOP_MUL:
@@ -803,6 +804,7 @@ dump_subexp_body_standard (struct expres
case STRUCTOP_MEMBER:
case STRUCTOP_MPTR:
elt = dump_subexp (exp, stream, elt);
+ /* FALL THROUGH */
case UNOP_NEG:
case UNOP_LOGICAL_NOT:
case UNOP_COMPLEMENT:
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [commit] Document that case statement fall-through is intentional.
2011-02-26 22:06 [commit] Document that case statement fall-through is intentional Michael Snyder
@ 2011-02-26 22:40 ` Mark Kettenis
2011-02-26 22:52 ` Michael Snyder
0 siblings, 1 reply; 3+ messages in thread
From: Mark Kettenis @ 2011-02-26 22:40 UTC (permalink / raw)
To: msnyder; +Cc: gdb-patches
> Date: Sat, 26 Feb 2011 13:52:18 -0800
> From: Michael Snyder <msnyder@vmware.com>
>
> Tested with "set debug expression 1" -- and I'm telling you, it took me
> a while to figure THAT out!
>
>
> --------------070307060603090205010008
> Content-Type: text/plain;
> name="dump.txt"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline;
> filename="dump.txt"
>
> 2011-02-26 Michael Snyder <msnyder@vmware.com>
>
> * expprint.c (dump_subexp_body_standard): Document that case
> statement is meant to fall through.
>
> Index: expprint.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/expprint.c,v
> retrieving revision 1.50
> diff -u -p -u -p -r1.50 expprint.c
> --- expprint.c 1 Feb 2011 18:56:34 -0000 1.50
> +++ expprint.c 26 Feb 2011 21:48:49 -0000
> @@ -767,6 +767,7 @@ dump_subexp_body_standard (struct expres
> case TERNOP_SLICE:
> case TERNOP_SLICE_COUNT:
> elt = dump_subexp (exp, stream, elt);
> + /* FALL THROUGH */
proper spelling is /* FALLTHROUGH */, at least that's what the classic
lint tool wants.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [commit] Document that case statement fall-through is intentional.
2011-02-26 22:40 ` Mark Kettenis
@ 2011-02-26 22:52 ` Michael Snyder
0 siblings, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2011-02-26 22:52 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
Mark Kettenis wrote:
>> Date: Sat, 26 Feb 2011 13:52:18 -0800
>> From: Michael Snyder <msnyder@vmware.com>
>>
>> Tested with "set debug expression 1" -- and I'm telling you, it took me
>> a while to figure THAT out!
>>
>>
>> --------------070307060603090205010008
>> Content-Type: text/plain;
>> name="dump.txt"
>> Content-Transfer-Encoding: 7bit
>> Content-Disposition: inline;
>> filename="dump.txt"
>>
>> 2011-02-26 Michael Snyder <msnyder@vmware.com>
>>
>> * expprint.c (dump_subexp_body_standard): Document that case
>> statement is meant to fall through.
>>
>> Index: expprint.c
>> ===================================================================
>> RCS file: /cvs/src/src/gdb/expprint.c,v
>> retrieving revision 1.50
>> diff -u -p -u -p -r1.50 expprint.c
>> --- expprint.c 1 Feb 2011 18:56:34 -0000 1.50
>> +++ expprint.c 26 Feb 2011 21:48:49 -0000
>> @@ -767,6 +767,7 @@ dump_subexp_body_standard (struct expres
>> case TERNOP_SLICE:
>> case TERNOP_SLICE_COUNT:
>> elt = dump_subexp (exp, stream, elt);
>> + /* FALL THROUGH */
>
> proper spelling is /* FALLTHROUGH */, at least that's what the classic
> lint tool wants.
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-26 22:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-26 22:06 [commit] Document that case statement fall-through is intentional Michael Snyder
2011-02-26 22:40 ` Mark Kettenis
2011-02-26 22:52 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox