From: Benjamin Kosnik Date: Tue, 28 Nov 2000 09:34:08 +0000 (+0000) Subject: tests_flags.in (LTCXX): Change CXX_FLAG to CXXFLAGS. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ce10512a9da9932822825cda0cd53d7e6b94ef3;p=platform%2Fupstream%2Fgcc.git tests_flags.in (LTCXX): Change CXX_FLAG to CXXFLAGS. 2000-11-27 Benjamin Kosnik * tests_flags.in (LTCXX): Change CXX_FLAG to CXXFLAGS. * testsuite/22_locale/ctor_copy_dtor.cc: Adjust formatting. * testsuite/27_io/istream_extractor_arith.cc (test11): New testcase, based on libstdc++/90. From-SVN: r37813 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ad8184e..74f92f1 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2000-11-27 Benjamin Kosnik + + * tests_flags.in (LTCXX): Change CXX_FLAG to CXXFLAGS. + + * testsuite/22_locale/ctor_copy_dtor.cc: Adjust formatting. + * testsuite/27_io/istream_extractor_arith.cc (test11): New + testcase, based on libstdc++/90. + 2000-11-27 Franz Sirl * config/cpu/arm/bits/atomicity.h (__exchange_and_add): Add diff --git a/libstdc++-v3/tests_flags.in b/libstdc++-v3/tests_flags.in index 74e24b4..b44bb8c 100644 --- a/libstdc++-v3/tests_flags.in +++ b/libstdc++-v3/tests_flags.in @@ -157,7 +157,7 @@ ST_FLAGS="-static" # LIBS == any extra needed -l switches, etc (may need more libs, lose lose) case ${query} in --built-library) - LTCXX="${LIBTOOL} --tag=CXX --mode=link ${CXX} ${CXX_FLAG} ${INC_PATH} + LTCXX="${LIBTOOL} --tag=CXX --mode=link ${CXX} ${CXXFLAGS} ${INC_PATH} ${LIB_PATH}/../libsupc++/libsupc++.la ${LIB_PATH}/libstdc++.la -no-install" LTEXE="${LIBTOOL} --mode=execute" @@ -166,7 +166,7 @@ case ${query} in --installed-library) # For the installed version, we really only need to use libtool and # the .la file to get correct rpaths. - LTCXX="${LIBTOOL} --tag=CXX --mode=link ${CXX} ${CXX_FLAG} ${INC_PATH} + LTCXX="${LIBTOOL} --tag=CXX --mode=link ${CXX} ${CXXFLAGS} ${INC_PATH} -L${LIB_PATH} ${LIB_PATH}/libstdc++.la -no-install -rpath ${LIB_PATH}" LTEXE="${LIBTOOL} --mode=execute" diff --git a/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc b/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc index 0c723bf..7bdd442 100644 --- a/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc +++ b/libstdc++-v3/testsuite/22_locale/ctor_copy_dtor.cc @@ -26,11 +26,10 @@ #include #if _GLIBCPP_USE_WCHAR_T - -typedef std::codecvt c_codecvt; -typedef std::codecvt_byname c_codecvt_byname; -typedef std::codecvt w_codecvt; -typedef std::codecvt_byname w_codecvt_byname; +typedef std::codecvt c_codecvt; +typedef std::codecvt_byname c_codecvt_byname; +typedef std::codecvt w_codecvt; +typedef std::codecvt_byname w_codecvt_byname; class gnu_codecvt: public c_codecvt { }; @@ -168,7 +167,7 @@ int main () { #if _GLIBCPP_USE_WCHAR_T test01(); -#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */ +#endif return 0; } diff --git a/libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc b/libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc index d410f74..219cd35 100644 --- a/libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc +++ b/libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc @@ -490,6 +490,29 @@ bool test10() { return test; } +// In the presence of no fmtflags, the input operator should behave +// like strtol(x, y, 0) +// libstdc++/90 +bool test11() +{ + bool test = true; + const char* cstrlit = "0x2a"; + + // sanity check via 'C' library call + char* err; + long l = strtol(cstrlit, &err, 0); + + std::istringstream iss(cstrlit); + iss.setf(std::ios::fmtflags(0), std::ios::basefield); + int i; + iss >> i; + + VERIFY (!iss.fail()); + VERIFY (l == i); + + return test; +} + int main() { test01(); @@ -501,6 +524,8 @@ int main() test08(); test09(); test10(); + + test11(); return 0; }