Correctly handle empty compound statements in check_reachable(), i.e. continue at...
authorChristoph Mallon <christoph.mallon@gmx.de>
Thu, 11 Dec 2008 21:17:30 +0000 (21:17 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 11 Dec 2008 21:17:30 +0000 (21:17 +0000)
[r24548]

parser.c

index d570caf..4409e92 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -5825,6 +5825,8 @@ static void check_reachable(statement_t *const stmt)
 
                case STATEMENT_COMPOUND:
                        next = stmt->compound.statements;
+                       if (next == NULL)
+                               next = stmt->base.next;
                        break;
 
                case STATEMENT_RETURN: {