| 1 |
/* This checks sizes of basic types. */ |
| 2 |
|
| 3 |
#include "defines.h" |
| 4 |
#include "macros.h" |
| 5 |
|
| 6 |
|
| 7 |
int |
| 8 |
main (void) |
| 9 |
{ |
| 10 |
/* Integral types. */ |
| 11 |
run_signed_tests2(check_size, char, TYPE_SIZE_CHAR); |
| 12 |
run_signed_tests2(check_size, short, TYPE_SIZE_SHORT); |
| 13 |
run_signed_tests2(check_size, int, TYPE_SIZE_INT); |
| 14 |
run_signed_tests2(check_size, long, TYPE_SIZE_LONG); |
| 15 |
run_signed_tests2(check_size, long long, TYPE_SIZE_LONG_LONG); |
| 16 |
#ifdef CHECK_INT128 |
| 17 |
run_signed_tests2(check_size, __int128, TYPE_SIZE_INT128); |
| 18 |
#endif |
| 19 |
check_size(enumtype, TYPE_SIZE_ENUM); |
| 20 |
|
| 21 |
/* Floating point types. */ |
| 22 |
check_size(float, TYPE_SIZE_FLOAT); |
| 23 |
check_size(double, TYPE_SIZE_DOUBLE); |
| 24 |
#ifdef CHECK_LONG_DOUBLE |
| 25 |
check_size(long double, TYPE_SIZE_LONG_DOUBLE); |
| 26 |
#endif |
| 27 |
#ifdef CHECK_FLOAT128 |
| 28 |
check_size(__float128, TYPE_SIZE_FLOAT128); |
| 29 |
#endif |
| 30 |
|
| 31 |
/* Pointer types. */ |
| 32 |
check_size(void *, TYPE_SIZE_POINTER); |
| 33 |
check_size(void (*)(), TYPE_SIZE_POINTER); |
| 34 |
|
| 35 |
return 0; |
| 36 |
} |