diff options
author | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2000-10-25 12:48:34 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2000-10-25 12:48:34 +0000 |
commit | 9aa1d5ac5e9074af1562cc32a217588c690d7e63 (patch) | |
tree | cf4ef8a61972d942542abec143917fd819700265 | |
parent | cc66e4ac40dbb8f4a93922def459c81d174af6cf (diff) | |
download | gcc-9aa1d5ac5e9074af1562cc32a217588c690d7e63.zip gcc-9aa1d5ac5e9074af1562cc32a217588c690d7e63.tar.gz gcc-9aa1d5ac5e9074af1562cc32a217588c690d7e63.tar.bz2 |
stl_pair.h (make_pair): Add LWG solution.
2000-10-24 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/stl_pair.h (make_pair): Add LWG solution.
* testsuite/21_strings/compare.cc (test01): Inject namespace std
into the mix.
* mkcheck.in (MAX_MEM_USAGE): Bump up to 3072. Strangely enough,
this works.
From-SVN: r37049
-rw-r--r-- | libstdc++-v3/include/bits/stl_pair.h | 5 | ||||
-rwxr-xr-x | libstdc++-v3/mkcheck.in | 7 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/21_strings/compare.cc | 10 |
3 files changed, 15 insertions, 7 deletions
diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index a6155a6..236f916 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -87,7 +87,12 @@ inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { #endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER */ template <class _T1, class _T2> +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +//181. make_pair() unintended behavior +inline pair<_T1, _T2> make_pair(const _T1 __x, const _T2 __y) +#else inline pair<_T1, _T2> make_pair(const _T1& __x, const _T2& __y) +#endif { return pair<_T1, _T2>(__x, __y); } diff --git a/libstdc++-v3/mkcheck.in b/libstdc++-v3/mkcheck.in index 6dd0f33..ac74673 100755 --- a/libstdc++-v3/mkcheck.in +++ b/libstdc++-v3/mkcheck.in @@ -107,6 +107,9 @@ LOG_FILE="$TEST_DIR/$(date +%Y%m%d)-mkchecklog.txt" # the names of the specific test files to be run TESTS_FILE="$TEST_DIR/$(date +%Y%m%d)-mkcheckfiles.txt" +# the heap size limit for testsuite binaries; start with a 2MB limit as per +# http://sources.redhat.com/ml/libstdc++/2000-10/msg00029.html +MAX_MEM_USAGE=3072 # # 2: clean, make files, append general test info @@ -233,7 +236,7 @@ test_file() # Actually run the executable and time it . . . TIMEFORMAT='timemark %R' - E_TIME_TEXT="$(exec 2>&1; time $EXENAME)" + E_TIME_TEXT="$(exec 2>&1; ulimit -d $MAX_MEM_USAGE; time $EXENAME)" E_ABNORMAL_TERMINATION=$? E_TIME="$(echo $E_TIME_TEXT | awk '{print $2}')" # joining those two commands does not work due to quoting problems: @@ -365,3 +368,5 @@ fi exit 0 + + diff --git a/libstdc++-v3/testsuite/21_strings/compare.cc b/libstdc++-v3/testsuite/21_strings/compare.cc index 16055ff..ba10e61 100644 --- a/libstdc++-v3/testsuite/21_strings/compare.cc +++ b/libstdc++-v3/testsuite/21_strings/compare.cc @@ -71,13 +71,11 @@ test_value(int result, want_value expected) int test01() { - std::string str_0("costa rica"); - std::string str_1("costa marbella"); - std::string str_2; + using namespace std; - using std::strcmp; - using std::strncmp; - using std::memcmp; + string str_0("costa rica"); + string str_1("costa marbella"); + string str_2; //sanity check test_value(strcmp("costa marbella", "costa rica"), lt); |