From: Michael Wetherell Date: Sun, 7 Aug 2005 16:48:29 +0000 (+0000) Subject: With Sun CC temporaries have block scope unless '-features=tmplife' is used. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8bc9a2f0b1b871f88b101e0cc2384f887826c522 With Sun CC temporaries have block scope unless '-features=tmplife' is used. Fixes bug report 1230877. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/configure.in b/configure.in index 4c80050b52..ce601eeb03 100644 --- a/configure.in +++ b/configure.in @@ -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++)