Index: libcxx/include/locale =================================================================== --- libcxx/include/locale +++ libcxx/include/locale @@ -2885,6 +2885,10 @@ unique_ptr& __wb, char_type*& __wn, char_type* __we) { + if (__b == __e) { + __err |= ios_base::failbit; + return false; + } const unsigned __bz = 100; unsigned __gbuf[__bz]; unique_ptr __gb(__gbuf, __do_nothing); Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp @@ -721,6 +721,17 @@ assert(err == std::ios_base::failbit); } } + { + // test for err + const my_facet f(1); + std::string v = "1.23"; + typedef input_iterator I; + long double ex = -1L; + std::ios_base::iostate err = std::ios_base::goodbit; + f.get(I(v.data()), I(v.data()), false, ios, err, ex); + assert(err == (std::ios_base::failbit | std::ios_base::eofbit)); + assert(ex == -1L); + } return 0; } Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp +++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp @@ -729,6 +729,17 @@ assert(ex == L""); } } + { + // test for err + const my_facet f(1); + std::string v = "1.23"; + typedef input_iterator I; + std::string ex = "NULL"; + std::ios_base::iostate err = std::ios_base::goodbit; + f.get(I(v.data()), I(v.data()), false, ios, err, ex); + assert(err == (std::ios_base::failbit | std::ios_base::eofbit)); + assert(ex == "NULL"); + } return 0; } Index: libcxx/utils/libcxx/test/params.py =================================================================== --- libcxx/utils/libcxx/test/params.py +++ libcxx/utils/libcxx/test/params.py @@ -9,32 +9,32 @@ from libcxx.test.dsl import * _warningFlags = [ - '-Werror', - '-Wall', - '-Wextra', - '-Wshadow', - '-Wundef', - '-Wno-unused-command-line-argument', - '-Wno-attributes', - '-Wno-pessimizing-move', - '-Wno-c++11-extensions', - '-Wno-user-defined-literals', - '-Wno-noexcept-type', - '-Wno-aligned-allocation-unavailable', - '-Wno-atomic-alignment', + #'-Werror', + #'-Wall', + #'-Wextra', + #'-Wshadow', + #'-Wundef', + #'-Wno-unused-command-line-argument', + #'-Wno-attributes', + #'-Wno-pessimizing-move', + #'-Wno-c++11-extensions', + #'-Wno-user-defined-literals', + #'-Wno-noexcept-type', + #'-Wno-aligned-allocation-unavailable', + #'-Wno-atomic-alignment', - # GCC warns about places where we might want to add sized allocation/deallocation - # functions, but we know better what we're doing/testing in the test suite. - '-Wno-sized-deallocation', + ## GCC warns about places where we might want to add sized allocation/deallocation + ## functions, but we know better what we're doing/testing in the test suite. + #'-Wno-sized-deallocation', - # These warnings should be enabled in order to support the MSVC - # team using the test suite; They enable the warnings below and - # expect the test suite to be clean. - '-Wsign-compare', - '-Wunused-variable', - '-Wunused-parameter', - '-Wunreachable-code', - '-Wno-unused-local-typedef', + ## These warnings should be enabled in order to support the MSVC + ## team using the test suite; They enable the warnings below and + ## expect the test suite to be clean. + #'-Wsign-compare', + #'-Wunused-variable', + #'-Wunused-parameter', + #'-Wunreachable-code', + #'-Wno-unused-local-typedef', ] _allStandards = ['c++03', 'c++11', 'c++14', 'c++17', 'c++20', 'c++2b']