aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-io.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2017-03-16 15:27:51 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2017-03-16 15:27:51 +0000
commitbcd682e1faed71fd861518ca43235706fc39a7cd (patch)
treede8fd5a5cb199e551d99a1fede15c60f699ed6d8 /gcc/fortran/trans-io.c
parent02e12bda2df86491a5d9c7294550fd4cd4968aa1 (diff)
downloadgcc-bcd682e1faed71fd861518ca43235706fc39a7cd.zip
gcc-bcd682e1faed71fd861518ca43235706fc39a7cd.tar.gz
gcc-bcd682e1faed71fd861518ca43235706fc39a7cd.tar.bz2
PR libstdc++/79980 fix BOM detection, maxcode checks, UCS2 handling
PR libstdc++/79980 * include/bits/locale_conv.h (__do_str_codecvt): Set __count on error path. * src/c++11/codecvt.cc (operator&=, operator|=, operator~): Overloads for manipulating codecvt_mode values. (read_utf16_bom): Compare input to BOM constants instead of integral constants that depend on endianness. Take mode parameter by reference and adjust it, to distinguish between no BOM present and UTF-16BE BOM present. (ucs4_in, ucs2_span, ucs4_span): Adjust calls to read_utf16_bom. (surrogates): New enumeration type. (utf16_in, utf16_out): Add surrogates parameter to choose between UTF-16 and UCS2 behaviour. (utf16_span, ucs2_span): Use std::min not std::max. (ucs2_out): Use std::min not std::max. Disallow surrogate pairs. (ucs2_in): Likewise. Adjust calls to read_utf16_bom. * testsuite/22_locale/codecvt/codecvt_utf16/79980.cc: New test. * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: New test. From-SVN: r246200
Diffstat (limited to 'gcc/fortran/trans-io.c')
0 files changed, 0 insertions, 0 deletions