From: Chris Cacciatore Date: Sat, 20 Aug 2016 03:21:10 +0000 (-0700) Subject: Updated switch statement comments. X-Git-Tag: V2.16~79^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=791981237851b289533696a0583b340a0613fb7f;p=cc65 Updated switch statement comments. * Now comments represent the fact that there may not be curly braces. --- diff --git a/src/cc65/swstmt.c b/src/cc65/swstmt.c index f71c3e40a..e995bd0b7 100644 --- a/src/cc65/swstmt.c +++ b/src/cc65/swstmt.c @@ -144,8 +144,8 @@ void SwitchStatement (void) /* Create a loop so we may use break. */ AddLoop (ExitLabel, 0); - /* Parse the following statement, which will actually be a compound - ** statement because of the curly brace at the current input position + /* Parse the following statement, which may actually be a compound + ** statement if there is a curly brace at the current input position */ HaveBreak = Statement (&RCurlyBrace); diff --git a/test/val/switch2.c b/test/val/switch2.c index 00206b0f6..65c24eeda 100644 --- a/test/val/switch2.c +++ b/test/val/switch2.c @@ -22,7 +22,7 @@ void switch_no_body(void) void switch_empty_body(void) { - switch(0) {}; + switch(0) {} } /* only worried about this file compiling successfully */