diff --git a/perl.h b/perl.h index 0868939d3a90..2bbc4f8a0eba 100644 --- a/perl.h +++ b/perl.h @@ -2560,22 +2560,7 @@ You probably want to be using L> instead. # endif #endif -/* On MS Windows,with 64-bit mingw-w64 compilers, we - need to attend to a __float128 alignment issue if - USE_QUADMATH is defined. Otherwise we simply: - typedef NVTYPE NV - 32-bit mingw.org compilers might also require - aligned(32) - at least that's what I found with my - Math::Foat128 module. But this is as yet untested - here, so no allowance is being made for mingw.org - compilers at this stage. -- sisyphus January 2021 -*/ -#if (defined(USE_LONG_DOUBLE) || defined(USE_QUADMATH)) && defined(__MINGW64__) - /* 64-bit build, mingw-w64 compiler only */ - typedef NVTYPE NV __attribute__ ((aligned(8))); -#else - typedef NVTYPE NV; -#endif +typedef NVTYPE NV; #ifdef I_IEEEFP # include diff --git a/win32/vmem.h b/win32/vmem.h index c425ae187a30..6115492769cb 100644 --- a/win32/vmem.h +++ b/win32/vmem.h @@ -71,12 +71,14 @@ inline void MEMODSlx(char *str, long x) class VMem; /* - * Address an alignment issue with x64 mingw-w64 ports of gcc-12 and - * (presumably) later. We do the same thing again 16 lines further down. - * See https://github.com/Perl/perl5/issues/19824 + * Address an alignment issue with x64 mingw-w64 ports of gcc. + * (We do the same thing again a little further down.) + * See https://github.com/Perl/perl5/issues/19824. + * Later modified as a result of discussions in + * https://github.com/Perl/perl5/issues/22577 */ -#if defined(__MINGW64__) && __GNUC__ > 11 +#if defined(__MINGW64__) typedef struct _MemoryBlockHeader* PMEMORY_BLOCK_HEADER __attribute__ ((aligned(16))); #else typedef struct _MemoryBlockHeader* PMEMORY_BLOCK_HEADER; @@ -87,7 +89,7 @@ typedef struct _MemoryBlockHeader { PMEMORY_BLOCK_HEADER pPrev; VMem *owner; -#if defined(__MINGW64__) && __GNUC__ > 11 +#if defined(__MINGW64__) } MEMORY_BLOCK_HEADER __attribute__ ((aligned(16))), *PMEMORY_BLOCK_HEADER; #else } MEMORY_BLOCK_HEADER, *PMEMORY_BLOCK_HEADER;