summaryrefslogtreecommitdiff
path: root/support/regression/tests/auto.c
blob: 7a90e04e0edf5ebf380709c5214dcb4e5ff66c2b (plain)
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
/*
   C2X auto
*/

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c23

char c = 7;
auto i = 7;

#endif

void
testAuto(void)
{
#ifdef __SDCC
	static auto s = 7;
	auto j = c + 3;
	ASSERT (sizeof (s) == sizeof (int));
	ASSERT (sizeof (i) == sizeof (int));
	ASSERT (sizeof (j) == sizeof (int));
#endif
}