Fix gtest to compile in the release configuration with clang.
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Aug 2011 22:09:07 +0000 (22:09 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Aug 2011 22:09:07 +0000 (22:09 +0000)
This change was made upstream in r443.

* gtest/src/gtest.cc:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92715 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/ThirdParty/ChangeLog
Source/ThirdParty/gtest/src/gtest.cc

index 82003a172ea7f14c9b621965b74276b860e00e2d..77589f6bb9e735a3b36c287f809b04e89f85eec8 100644 (file)
@@ -1,3 +1,11 @@
+2011-08-09  Mark Rowe  <mrowe@apple.com>
+
+        Fix gtest to compile in the release configuration with clang.
+
+        This change was made upstream in r443.
+
+        * gtest/src/gtest.cc:
+
 2011-08-04  Mark Rowe  <mrowe@apple.com>
 
         Future-proof Xcode configuration settings.
index 342d4582b68a9c0f53efaab0379ea8686651ffef..5b871c0adb0a1c4cfa237554057d51608461950e 100644 (file)
@@ -3602,7 +3602,7 @@ void UnitTest::AddTestPartResult(TestPartResult::Type result_type,
       // the --gtest_catch_exceptions flags are specified.
       DebugBreak();
 #else
-      *static_cast<int*>(NULL) = 1;
+      *static_cast<volatile int*>(NULL) = 1;
 #endif  // GTEST_OS_WINDOWS
     } else if (GTEST_FLAG(throw_on_failure)) {
 #if GTEST_HAS_EXCEPTIONS