summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug-1654060.c
blob: 6958139bb3214399bc2ac94011261c031b9d518f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
   bug-1654060.c

   typedef within function causes syntax error
*/

#include <testfwk.h>
typedef char mytype1;
typedef int mytype2;

mytype1 c1 = 'A';
mytype2 i1 = 12345;

void testTypedef(void)
{
  typedef int mytype1;
  typedef char mytype2;

  mytype1 i2 = 21435;
  mytype2 c2 = 'B';

  ASSERT(c1 == 'A');
  ASSERT(i1 == 12345);
  ASSERT(c2 == 'B');
  ASSERT(i2 == 21435);
}