From d2eca24ac87d6f6df0e2b5a690ae26e36b0260cc Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Tue, 7 Jun 2022 13:44:51 +0000 Subject: [PATCH] Fix architecture typo x64_64 -> x86_64 x64_64 does not seem to be a valid architecture, and likely is just a typo for what should be x86_64. --- regression/ansi-c/sizeof1/main.c | 10 +++++++--- src/util/config.cpp | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/regression/ansi-c/sizeof1/main.c b/regression/ansi-c/sizeof1/main.c index 936e3024cbc..e3612b9b29e 100644 --- a/regression/ansi-c/sizeof1/main.c +++ b/regression/ansi-c/sizeof1/main.c @@ -12,16 +12,20 @@ STATIC_ASSERT(sizeof(void *)==sizeof(size_t)); #ifdef _WIN32 -#ifdef _WIN64 +# ifdef _WIN64 STATIC_ASSERT(sizeof(void *)==8); STATIC_ASSERT(sizeof(int)==4); STATIC_ASSERT(sizeof(long int)==4); STATIC_ASSERT(sizeof(long long int)==8); STATIC_ASSERT(sizeof(wchar_t)==2); +# ifdef __MINGW64__ +STATIC_ASSERT(sizeof(long double) == 16); +# else STATIC_ASSERT(sizeof(long double)==8); +# endif -#else +# else STATIC_ASSERT(sizeof(void *)==4); STATIC_ASSERT(sizeof(int)==4); @@ -30,7 +34,7 @@ STATIC_ASSERT(sizeof(long long int)==8); STATIC_ASSERT(sizeof(wchar_t)==2); STATIC_ASSERT(sizeof(long double)==8); -#endif +# endif #else diff --git a/src/util/config.cpp b/src/util/config.cpp index c39d528f129..51b39f0894d 100644 --- a/src/util/config.cpp +++ b/src/util/config.cpp @@ -993,7 +993,7 @@ bool configt::set(const cmdlinet &cmdline) // long double is the same as double in Visual Studio, // but it's 16 bytes with GCC with the 64-bit target. - if(arch=="x64_64" && cmdline.isset("gcc")) + if(arch == "x86_64" && cmdline.isset("gcc")) ansi_c.long_double_width=16*8; else ansi_c.long_double_width=8*8;