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;