diff --git a/make_machdep/sizeof_double.i b/make_machdep/sizeof_double.c similarity index 100% rename from make_machdep/sizeof_double.i rename to make_machdep/sizeof_double.c diff --git a/make_machdep/sizeof_float.i b/make_machdep/sizeof_float.c similarity index 100% rename from make_machdep/sizeof_float.i rename to make_machdep/sizeof_float.c diff --git a/make_machdep/sizeof_fun.c b/make_machdep/sizeof_fun.c index 58427c9b93e66c5c2a064d6216cc9969d5fc5f06..9b893dbab6913ee5dbec41e5deeea526da7f194a 100644 --- a/make_machdep/sizeof_fun.c +++ b/make_machdep/sizeof_fun.c @@ -1,5 +1 @@ -#include "make_machdep_common.h" - -int main(void); - -unsigned char sizeof_fun = sizeof(main); +_Static_assert(sizeof(void ()) != 1, "sizeof_fun is 1"); diff --git a/make_machdep/sizeof_fun.i b/make_machdep/sizeof_fun.i deleted file mode 100644 index 9b893dbab6913ee5dbec41e5deeea526da7f194a..0000000000000000000000000000000000000000 --- a/make_machdep/sizeof_fun.i +++ /dev/null @@ -1 +0,0 @@ -_Static_assert(sizeof(void ()) != 1, "sizeof_fun is 1"); diff --git a/make_machdep/sizeof_int.i b/make_machdep/sizeof_int.c similarity index 100% rename from make_machdep/sizeof_int.i rename to make_machdep/sizeof_int.c diff --git a/make_machdep/sizeof_long.i b/make_machdep/sizeof_long.c similarity index 100% rename from make_machdep/sizeof_long.i rename to make_machdep/sizeof_long.c diff --git a/make_machdep/sizeof_longdouble.c b/make_machdep/sizeof_longdouble.c index 1d83113026e399a5bd6246caa752c9c2f3128050..d76733dce3cc0a8c0b2ec0f1c68902b660c35545 100644 --- a/make_machdep/sizeof_longdouble.c +++ b/make_machdep/sizeof_longdouble.c @@ -1,3 +1,16 @@ -#include "make_machdep_common.h" - -unsigned char sizeof_longdouble = sizeof(long double); +_Static_assert(sizeof(long double) != 1, "sizeof_longdouble is 1"); +_Static_assert(sizeof(long double) != 2, "sizeof_longdouble is 2"); +_Static_assert(sizeof(long double) != 3, "sizeof_longdouble is 3"); +_Static_assert(sizeof(long double) != 4, "sizeof_longdouble is 4"); +_Static_assert(sizeof(long double) != 5, "sizeof_longdouble is 5"); +_Static_assert(sizeof(long double) != 6, "sizeof_longdouble is 6"); +_Static_assert(sizeof(long double) != 7, "sizeof_longdouble is 7"); +_Static_assert(sizeof(long double) != 8, "sizeof_longdouble is 8"); +_Static_assert(sizeof(long double) != 9, "sizeof_longdouble is 9"); +_Static_assert(sizeof(long double) != 10, "sizeof_longdouble is 10"); +_Static_assert(sizeof(long double) != 11, "sizeof_longdouble is 11"); +_Static_assert(sizeof(long double) != 12, "sizeof_longdouble is 12"); +_Static_assert(sizeof(long double) != 13, "sizeof_longdouble is 13"); +_Static_assert(sizeof(long double) != 14, "sizeof_longdouble is 14"); +_Static_assert(sizeof(long double) != 15, "sizeof_longdouble is 15"); +_Static_assert(sizeof(long double) != 16, "sizeof_longdouble is 16"); diff --git a/make_machdep/sizeof_longdouble.i b/make_machdep/sizeof_longdouble.i deleted file mode 100644 index d76733dce3cc0a8c0b2ec0f1c68902b660c35545..0000000000000000000000000000000000000000 --- a/make_machdep/sizeof_longdouble.i +++ /dev/null @@ -1,16 +0,0 @@ -_Static_assert(sizeof(long double) != 1, "sizeof_longdouble is 1"); -_Static_assert(sizeof(long double) != 2, "sizeof_longdouble is 2"); -_Static_assert(sizeof(long double) != 3, "sizeof_longdouble is 3"); -_Static_assert(sizeof(long double) != 4, "sizeof_longdouble is 4"); -_Static_assert(sizeof(long double) != 5, "sizeof_longdouble is 5"); -_Static_assert(sizeof(long double) != 6, "sizeof_longdouble is 6"); -_Static_assert(sizeof(long double) != 7, "sizeof_longdouble is 7"); -_Static_assert(sizeof(long double) != 8, "sizeof_longdouble is 8"); -_Static_assert(sizeof(long double) != 9, "sizeof_longdouble is 9"); -_Static_assert(sizeof(long double) != 10, "sizeof_longdouble is 10"); -_Static_assert(sizeof(long double) != 11, "sizeof_longdouble is 11"); -_Static_assert(sizeof(long double) != 12, "sizeof_longdouble is 12"); -_Static_assert(sizeof(long double) != 13, "sizeof_longdouble is 13"); -_Static_assert(sizeof(long double) != 14, "sizeof_longdouble is 14"); -_Static_assert(sizeof(long double) != 15, "sizeof_longdouble is 15"); -_Static_assert(sizeof(long double) != 16, "sizeof_longdouble is 16"); diff --git a/make_machdep/sizeof_longlong.i b/make_machdep/sizeof_longlong.c similarity index 100% rename from make_machdep/sizeof_longlong.i rename to make_machdep/sizeof_longlong.c diff --git a/make_machdep/sizeof_ptr.i b/make_machdep/sizeof_ptr.c similarity index 100% rename from make_machdep/sizeof_ptr.i rename to make_machdep/sizeof_ptr.c diff --git a/make_machdep/sizeof_short.i b/make_machdep/sizeof_short.c similarity index 100% rename from make_machdep/sizeof_short.i rename to make_machdep/sizeof_short.c diff --git a/make_machdep/sizeof_void.c b/make_machdep/sizeof_void.c index 3f3e370d2004f372fc10b31400be8367b26c0958..c5f0e53a77bdb82e8078ae31db54ee2f49553928 100644 --- a/make_machdep/sizeof_void.c +++ b/make_machdep/sizeof_void.c @@ -1,3 +1 @@ -#include "make_machdep_common.h" - -unsigned char sizeof_void = sizeof(void); +_Static_assert(sizeof(void)!=1,"sizeof_void is 1"); diff --git a/make_machdep/sizeof_void.i b/make_machdep/sizeof_void.i deleted file mode 100644 index c5f0e53a77bdb82e8078ae31db54ee2f49553928..0000000000000000000000000000000000000000 --- a/make_machdep/sizeof_void.i +++ /dev/null @@ -1 +0,0 @@ -_Static_assert(sizeof(void)!=1,"sizeof_void is 1");