summaryrefslogtreecommitdiff
path: root/support/regression/tests/declafterstmt.c
blob: baf468cb59ea4bfcebe16029c6618382fb3eddcf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/** Tests declarations after statements within the same block (C99).
 */
#include <testfwk.h>

void
testDeclAfterStmt(void)
{
  int a = 0;
  a++;
  int b = 1;
  {
    int a = 0;
  }
  int c = a + b;
  ASSERT(c == 2);
}