[svn:parrot] r46584 - trunk/config/auto/va_ptr

rblasch at svn.parrot.org rblasch at svn.parrot.org
Thu May 13 11:33:53 UTC 2010


Author: rblasch
Date: Thu May 13 11:33:53 2010
New Revision: 46584
URL: https://trac.parrot.org/parrot/changeset/46584

Log:
[config] Make va_ptr probe work with MSVC and -O2.

Modified:
   trunk/config/auto/va_ptr/test_c.in

Modified: trunk/config/auto/va_ptr/test_c.in
==============================================================================
--- trunk/config/auto/va_ptr/test_c.in	Thu May 13 08:52:24 2010	(r46583)
+++ trunk/config/auto/va_ptr/test_c.in	Thu May 13 11:33:53 2010	(r46584)
@@ -43,6 +43,15 @@
     test2(&a);
 }
 
+/*
+ * Visual C++ dies with an Internal Compiler Error when compiling the
+ * following function using -O2.  Don't know why, but maybe because of this:
+ * https://connect.microsoft.com/VisualStudio/feedback/details/457892/internal-compiler-error
+ * Disable optimizations for this function using a pragma.
+ */
+#if defined _MSC_VER
+#  pragma optimize("t", off)
+#endif
 static void
 test0(int n, ...)
 {
@@ -51,6 +60,9 @@
     test1(ap);
     va_end(ap);
 }
+#if defined _MSC_VER
+#  pragma optimize("", on)
+#endif
 
 int
 main(int argc, char *argv[])


More information about the parrot-commits mailing list