Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / support / regression / tcc / 102_alignas.c
blob62d3ed24993fad8fe0badc9ecee5080fda6f133d
1 _Alignas(16) int i1;
2 int _Alignas(16) i2;
3 void _Alignas(16) *p2;
4 _Alignas(16) i3;
5 int _Alignas(double) i4;
6 int _Alignas(int) i5;
7 #if 0
8 /* The following are currently wrongly accepted by TCC but really shouldn't. */
9 int _Alignas(int _Alignas(16)) i6; //wrong, 'int _Alignas(16)' is no type-name
10 typedef int _Alignas(16) int16aligned_t; //wrong, _Alignas invalid on typedef
11 int16aligned_t i7;
12 #endif
13 /* i8 should get an alignment of 16, because unlike _Alignas the
14 corresponding attribute _does_ apply to type-name, though not in
15 some clang versions. */
16 int _Alignas(int __attribute__((aligned(16)))) i8;
17 extern int printf(const char*, ...);
18 #ifdef _MSC_VER
19 #define alignof(x) (int)__alignof(x)
20 #else
21 #define alignof(x) (int)__alignof__(x)
22 #endif
23 int main()
25 printf("%d %d %d %d\n",
26 alignof(i1) == 16, alignof(i4) == alignof(double),
27 alignof(i5) == alignof(int) , alignof(i8) == 16);
28 return 0;