Skip to content

Commit 045b0df

Browse files
sisyphuskhwilliamson
authored andcommitted
[Win32] Remove obsolete code from perl.h.
Remove a Win32-specific memory alignment instruction as discussed in #22577.
1 parent eee5649 commit 045b0df

File tree

2 files changed

+8
-21
lines changed

2 files changed

+8
-21
lines changed

perl.h

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2560,22 +2560,7 @@ You probably want to be using L<C</INT2PTR>> instead.
25602560
# endif
25612561
#endif
25622562

2563-
/* On MS Windows,with 64-bit mingw-w64 compilers, we
2564-
need to attend to a __float128 alignment issue if
2565-
USE_QUADMATH is defined. Otherwise we simply:
2566-
typedef NVTYPE NV
2567-
32-bit mingw.org compilers might also require
2568-
aligned(32) - at least that's what I found with my
2569-
Math::Foat128 module. But this is as yet untested
2570-
here, so no allowance is being made for mingw.org
2571-
compilers at this stage. -- sisyphus January 2021
2572-
*/
2573-
#if (defined(USE_LONG_DOUBLE) || defined(USE_QUADMATH)) && defined(__MINGW64__)
2574-
/* 64-bit build, mingw-w64 compiler only */
2575-
typedef NVTYPE NV __attribute__ ((aligned(8)));
2576-
#else
2577-
typedef NVTYPE NV;
2578-
#endif
2563+
typedef NVTYPE NV;
25792564

25802565
#ifdef I_IEEEFP
25812566
# include <ieeefp.h>

win32/vmem.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ inline void MEMODSlx(char *str, long x)
7171
class VMem;
7272

7373
/*
74-
* Address an alignment issue with x64 mingw-w64 ports of gcc-12 and
75-
* (presumably) later. We do the same thing again 16 lines further down.
76-
* See https://github.com/Perl/perl5/issues/19824
74+
* Address an alignment issue with x64 mingw-w64 ports of gcc.
75+
* (We do the same thing again a little further down.)
76+
* See https://github.com/Perl/perl5/issues/19824.
77+
* Later modified as a result of discussions in
78+
* https://github.com/Perl/perl5/issues/22577
7779
*/
7880

79-
#if defined(__MINGW64__) && __GNUC__ > 11
81+
#if defined(__MINGW64__)
8082
typedef struct _MemoryBlockHeader* PMEMORY_BLOCK_HEADER __attribute__ ((aligned(16)));
8183
#else
8284
typedef struct _MemoryBlockHeader* PMEMORY_BLOCK_HEADER;
@@ -87,7 +89,7 @@ typedef struct _MemoryBlockHeader {
8789
PMEMORY_BLOCK_HEADER pPrev;
8890
VMem *owner;
8991

90-
#if defined(__MINGW64__) && __GNUC__ > 11
92+
#if defined(__MINGW64__)
9193
} MEMORY_BLOCK_HEADER __attribute__ ((aligned(16))), *PMEMORY_BLOCK_HEADER;
9294
#else
9395
} MEMORY_BLOCK_HEADER, *PMEMORY_BLOCK_HEADER;

0 commit comments

Comments
 (0)