This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix codecvt<char16_t, char, mbstate_t>


On 18/02/15 19:07 +0000, Jonathan Wakely wrote:
While working on PR64797 I discovered that the codecvt<char16_t,...>
specialization was, erm, completely broken when creating UTF-16
surrogate pairs.

This fixes it and adds a test, based on the char32_t one I added to
the testsuite yesterday. Tested x86_64-linux (little-endian) and
powerpc64-linux (big-endian).

Committed, along with this tweak to only run the tests where
supported.


commit ada5fdcd89fb1e91c43d2bfcba852fdaf27363b0
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Feb 18 19:51:00 2015 +0000

    	* testsuite/22_locale/codecvt/char16_t.cc: Add dg-require-cstdint.
    	* testsuite/22_locale/codecvt/char32_t.cc: Likewise.

diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/char16_t.cc b/libstdc++-v3/testsuite/22_locale/codecvt/char16_t.cc
index 14477f5..9271eca 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/char16_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/char16_t.cc
@@ -16,6 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++11" }
+// { dg-require-cstdint "" }
 
 // [locale.codecvt], C++11 22.4.1.4.  specialization.
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/char32_t.cc b/libstdc++-v3/testsuite/22_locale/codecvt/char32_t.cc
index 07f72c4..ebf30ad 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/char32_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/char32_t.cc
@@ -1,4 +1,5 @@
 // { dg-options "-std=gnu++11" }
+// { dg-require-cstdint "" }
 
 // 2014-04-24 RÃdiger Sonderfeld
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]