2014-09-25 Eli Zaretskii <eliz@gnu.org>
+ * lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
+ MinGW builds that use GCC before 4.2.
+
Default to stack objects on DOS_NT platforms as well.
* w32term.h (ALIGN_STACK) [__GNUC__]: Define to
__attribute__((force_align_arg_pointer)) for GCC 4.2 and later.
http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00506.html. */
#ifndef USE_STACK_LISP_OBJECTS
# if defined __GNUC__ && !defined __clang__
-# define USE_STACK_LISP_OBJECTS true
+ /* 32-bit MinGW builds need at least GCC 4.2 to support this. */
+# if defined __MINGW32__ && !defined _W64 \
+ && __GNUC__ + (__GNUC_MINOR__ > 1) < 5
+# define USE_STACK_LISP_OBJECTS false
+# else /* !(__MINGW32__ && __GNUC__ < 4.2) */
+# define USE_STACK_LISP_OBJECTS true
+# endif
# else
# define USE_STACK_LISP_OBJECTS false
# endif