stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r516250 - /incubator/stdcxx/trunk/tests/iostream/27.istream.fmat.arith.cpp
Date Fri, 09 Mar 2007 01:17:26 GMT
Author: sebor
Date: Thu Mar  8 17:17:26 2007
New Revision: 516250

URL: http://svn.apache.org/viewvc?view=rev&rev=516250
Log:
2007-03-08  Martin Sebor  <sebor@roguewave.com>

	* 27.istream.fmat.arith.cpp (make_locale): Hardcoded array size
	to UCHAR_MAX to work around a gcc 3.4 bug described in STDCXX-351.

Modified:
    incubator/stdcxx/trunk/tests/iostream/27.istream.fmat.arith.cpp

Modified: incubator/stdcxx/trunk/tests/iostream/27.istream.fmat.arith.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/iostream/27.istream.fmat.arith.cpp?view=diff&rev=516250&r1=516249&r2=516250
==============================================================================
--- incubator/stdcxx/trunk/tests/iostream/27.istream.fmat.arith.cpp (original)
+++ incubator/stdcxx/trunk/tests/iostream/27.istream.fmat.arith.cpp Thu Mar  8 17:17:26 2007
@@ -51,8 +51,18 @@
 const std::locale
 make_locale (const CharT*, const LocaleData &data)
 {
-    // determine the number of classic characters (expecting 256)
+#if 255U == _RWSTD_UCHAR_MAX
+
+    // work around a bogus gcc error: ISO C++ forbids variable-size
+    // array (see https://issues.apache.org/jira/browse/STDCXX-351)
+    static const std::size_t N = 256;
+
+#else   // if UCHAR_MAX != 255
+
+    // determine the number of classic characters
     static const std::size_t N = std::ctype<char>::table_size;
+
+#endif
 
     // derive a class so we can call the protected classic_table()
     struct ClassicTable: std::ctype<char> {



Mime
View raw message