stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r597428 - in /incubator/stdcxx/trunk: include/ansi/cwchar tests/strings/21.cwchar.cpp
Date Thu, 22 Nov 2007 15:22:45 GMT
Author: faridz
Date: Thu Nov 22 07:22:44 2007
New Revision: 597428

URL: http://svn.apache.org/viewvc?rev=597428&view=rev
Log:
2007-11-21 Farid Zaripov <farid_zaripov@epam.com>

	Merged r597425 from branches/4.2.x with a fix for STDCXX-637
	* include/ansi/cwchar [_RWSTD_STRICT_ANSI]: #undefine getwc
	and putwc masking macros.
	* tests/strings/21.cwchar.cpp (test_macros): Issue rw_warn()
	instead of rw_assert() in non strict ANSI mode.
	(test_functions): Issue rw_warn() instead of rw_assert().

Modified:
    incubator/stdcxx/trunk/include/ansi/cwchar
    incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp

Modified: incubator/stdcxx/trunk/include/ansi/cwchar
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/ansi/cwchar?rev=597428&r1=597427&r2=597428&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/ansi/cwchar (original)
+++ incubator/stdcxx/trunk/include/ansi/cwchar Thu Nov 22 07:22:44 2007
@@ -46,6 +46,13 @@
 #include _RWSTD_ANSI_C_WCHAR_H
 
 
+#ifdef _RWSTD_STRICT_ANSI
+// 17.4.1.2, p6 - masking macros are not allowed
+#  undef getwc
+#  undef putwc
+#endif   // _RWSTD_STRICT_ANSI
+
+
 #if _RWSTD_NAMESPACE_STD_OPEN == 17
 #undef _RWSTD_NAMESPACE_STD_OPEN
 

Modified: incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp?rev=597428&r1=597427&r2=597428&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp (original)
+++ incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp Thu Nov 22 07:22:44 2007
@@ -509,9 +509,15 @@
     }
 
     for (unsigned i = 0; masking_macros [i]; ++i) {
+#ifdef _RWSTD_STRICT_ANSI
         rw_assert ('\0' == masking_macros [i][0], 0, __LINE__,
                    "masking macro %s unexpectedly defined",
                    masking_macros [i]);
+#else
+        rw_warn ('\0' == masking_macros [i][0], 0, __LINE__,
+                 "masking macro %s unexpectedly defined",
+                 masking_macros [i]);
+#endif
     }
 }
 
@@ -855,13 +861,13 @@
                  std_name, #fun, overload < 0, 0 == overload);          \
         const char* const return_type_name =                            \
             get_type_name ((T)0, std::fun args);                        \
-        rw_assert (0 == ncalls, 0, __LINE__,                            \
-                   "%s::%s("                                            \
-                   "%{?}%{:}/* %{?}non-%{;}const overload */%{;}) "     \
-                   "not declared (_RWSTD_NO_%s = %d, "                  \
-                   "_RWSTD_NO_%s_IN_LIBC = %d)",                        \
-                   std_name, #fun, overload < 0, 0 == overload,         \
-                   #macro, EVAL (macro), #macro, EVAL_IN_LIBC (macro)); \
+        rw_warn (0 == ncalls, 0, __LINE__,                              \
+                 "%s::%s("                                              \
+                 "%{?}%{:}/* %{?}non-%{;}const overload */%{;}) "       \
+                 "not declared (_RWSTD_NO_%s = %d, "                    \
+                 "_RWSTD_NO_%s_IN_LIBC = %d)",                          \
+                 std_name, #fun, overload < 0, 0 == overload,           \
+                 #macro, EVAL (macro), #macro, EVAL_IN_LIBC (macro));   \
         if (0 == ncalls)                                                \
             rw_assert (0 == return_type_name, 0, __LINE__, "%s::%s("    \
                        "%{?}%{:}/* %{?}non-%{;}const overload */%{;}) " \



Mime
View raw message