]> git.saurik.com Git - wxWidgets.git/commitdiff
With Sun CC temporaries have block scope unless '-features=tmplife' is used.
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Sun, 7 Aug 2005 16:48:29 +0000 (16:48 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Sun, 7 Aug 2005 16:48:29 +0000 (16:48 +0000)
Fixes bug report 1230877.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure.in

index 4c80050b5242a973473c84fa3dac1319ea9282e3..ce601eeb034f0e96bc6b7c9ffe390a9cea0ffcdf 100644 (file)
@@ -1896,6 +1896,12 @@ AC_CXX_STATIC_CAST
 dnl we don't use HAVE_DYNAMIC_CAST anywhere right now...
 dnl AC_CXX_DYNAMIC_CAST
 
+dnl With Sun CC, temporaries have block scope by default. This flag is needed
+dnl to get the expression scope behaviour that conforms to the standard.
+if test "x$SUNCXX" = xyes; then
+    CXXFLAGS="$CXXFLAGS -features=tmplife"
+fi
+
 dnl check for std::string or std::wstring
 if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then
     AC_LANG_PUSH(C++)