Skip to content

Commit 37158af

Browse files
committed
Fix C++ behaviour and comments for ALIGNOF_MAX_ALIGN_T
1 parent f968206 commit 37158af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Include/pyport.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -746,13 +746,13 @@ extern char * _getpty(int *, int, mode_t, int);
746746
#endif
747747

748748
// Make sure we have maximum alignment, even if the current compiler
749-
// does not support max_align_t.
750-
// - Autoconf report alignment of unknown types to 0.
751-
// - We don't have the Py_MAX macro yet.
749+
// does not support max_align_t. Note that:
750+
// - Autoconf reports alignment of unknown types to 0.
752751
// - 'long double' has maximum alignment on *most* platforms,
753752
// looks like the best we can do for pre-C11 compilers.
754753
// - The value is tested, see test_alignof_max_align_t
755754
#if !defined(ALIGNOF_MAX_ALIGN_T) || ALIGNOF_MAX_ALIGN_T == 0
755+
# undef ALIGNOF_MAX_ALIGN_T
756756
# define ALIGNOF_MAX_ALIGN_T _Alignof(long double)
757757
#endif
758758

0 commit comments

Comments
 (0)