From: Benjamin Kosnik Date: Mon, 9 Sep 2002 20:58:40 +0000 (+0000) Subject: misc-inst.cc: Remove some instantiations. X-Git-Tag: releases/gcc-3.2.1~300 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8597b0b8f4e73fecfc11e2b69a8691790c98ff9;p=thirdparty%2Fgcc.git misc-inst.cc: Remove some instantiations. 2002-09-09 Benjamin Kosnik * src/misc-inst.cc: Remove some instantiations. * testsuite/abi_check.cc: Make output results more verbose. * config/os/gnu-linux/ctype_base.h: Remove shadow headers injections. From-SVN: r56982 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f8a26dec0691..7768faeadffa 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2002-09-09 Benjamin Kosnik + + * src/misc-inst.cc: Remove some instantiations. + + * testsuite/abi_check.cc: Make output results more verbose. + + * config/os/gnu-linux/ctype_base.h: Remove shadow headers injections. + 2002-09-07 Jakub Jelinek * config/locale/generic/messages_members.cc: Add specialization for diff --git a/libstdc++-v3/config/os/gnu-linux/bits/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/bits/ctype_base.h index 50a5f797a4cd..a431f971c9ba 100644 --- a/libstdc++-v3/config/os/gnu-linux/bits/ctype_base.h +++ b/libstdc++-v3/config/os/gnu-linux/bits/ctype_base.h @@ -1,6 +1,6 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +// Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -33,20 +33,6 @@ // Information as gleaned from /usr/include/ctype.h -#if _GLIBCPP_USE_SHADOW_HEADERS - using _C_legacy::_ISspace; - using _C_legacy::_ISprint; - using _C_legacy::_IScntrl; - using _C_legacy::_ISupper; - using _C_legacy::_ISlower; - using _C_legacy::_ISalpha; - using _C_legacy::_ISdigit; - using _C_legacy::_ISpunct; - using _C_legacy::_ISxdigit; - using _C_legacy::_ISalnum; - using _C_legacy::_ISgraph; -#endif - struct ctype_base { // Non-standard typedefs. diff --git a/libstdc++-v3/src/misc-inst.cc b/libstdc++-v3/src/misc-inst.cc index 5576d2cb22a7..f4f2ab1566e4 100644 --- a/libstdc++-v3/src/misc-inst.cc +++ b/libstdc++-v3/src/misc-inst.cc @@ -70,24 +70,7 @@ namespace std #if 1 // XXX - // 2002-05-24 These are no longer needed and should be deleted. - - // algorithm - typedef _Char_traits_match > char_match; - - template - const char* - find_if - (const char *, const char *, char_match, random_access_iterator_tag); - -#ifdef _GLIBCPP_USE_WCHAR_T - typedef _Char_traits_match > wchar_match; - - template const wchar_t* - find_if - (const wchar_t*, const wchar_t*, wchar_match, random_access_iterator_tag); -#endif - + // 2002-05-24 These are no longer needed and should eventually be deleted. template string* __uninitialized_fill_n_aux diff --git a/libstdc++-v3/testsuite/abi_check.cc b/libstdc++-v3/testsuite/abi_check.cc index 10c300c853d1..fd030063d0c0 100644 --- a/libstdc++-v3/testsuite/abi_check.cc +++ b/libstdc++-v3/testsuite/abi_check.cc @@ -56,24 +56,54 @@ struct symbol_info }; bool -operator==(const symbol_info& lhs, const symbol_info& rhs) +check_compatible(const symbol_info& lhs, const symbol_info& rhs, + bool verbose = false) { + using namespace std; bool ret = true; + const char tab = '\t'; // Check to see if symbol_infos are compatible. - ret &= lhs.type == rhs.type; - ret &= lhs.name == rhs.name; - ret &= lhs.size == rhs.size; + if (lhs.type != rhs.type) + { + ret = false; + if (verbose) + { + cout << tab << "incompatible types" << endl; + } + } + + if (lhs.name != rhs.name) + { + ret = false; + if (verbose) + { + cout << tab << "incompatible names" << endl; + } + } + + if (lhs.size != rhs.size) + { + ret = false; + if (verbose) + { + cout << tab << "incompatible sizes" << endl; + } + } // Expect something more sophisticated eventually. - ret &= lhs.version == rhs.version; + if (lhs.version != rhs.version) + { + ret = false; + if (verbose) + { + cout << tab << "incompatible versions" << endl; + } + } + return ret; } -bool -operator!=(const symbol_info& lhs, const symbol_info& rhs) -{ return !(lhs == rhs); } - template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& os, symbol_info& si) @@ -188,8 +218,8 @@ typedef std::deque symbol_names; typedef __gnu_cxx::hash_map symbol_infos; void -collect_symbol_data(const char* file, symbol_infos& symbols, - symbol_names& names) +create_symbol_data(const char* file, symbol_infos& symbols, + symbol_names& names) { // Parse list of symbols in file into vectors of symbol_info. // For 3.2.0 on x86/linux, this usually is @@ -213,6 +243,21 @@ collect_symbol_data(const char* file, symbol_infos& symbols, } } +void +report_symbol_info(const symbol_info& symbol, std::size_t n) +{ + using namespace std; + const char tab = '\t'; + cout << tab << n << endl; + cout << tab << "symbol"<< endl; + cout << tab << symbol.name << endl; + + // Add any other information to display here. + cout << tab << "demangled symbol"<< endl; + cout << tab << symbol.name_demangled << endl; + + cout << endl; +} int main(int argc, char** argv) { @@ -275,8 +320,8 @@ int main(int argc, char** argv) symbol_names baseline_names; symbol_infos test_symbols; symbol_names test_names; - collect_symbol_data(baseline_file, baseline_symbols, baseline_names); - collect_symbol_data(test_file, test_symbols, test_names); + create_symbol_data(baseline_file, baseline_symbols, baseline_names); + create_symbol_data(test_file, test_symbols, test_names); // Basic sanity check. (Was: error checking, what's that?) const symbol_names::size_type baseline_size = baseline_names.size(); @@ -323,28 +368,31 @@ int main(int argc, char** argv) vector incompatible; for (size_t i = 0; i < shared_size; ++i) { - symbol_info binfo = baseline_symbols[shared_names[i].first.c_str()]; - symbol_info tinfo = test_symbols[shared_names[i].second.c_str()]; - if (binfo != tinfo) - incompatible.push_back(symbol_pair(binfo, tinfo)); + symbol_info base = baseline_symbols[shared_names[i].first.c_str()]; + symbol_info test = test_symbols[shared_names[i].second.c_str()]; + if (!check_compatible(base, test)) + incompatible.push_back(symbol_pair(base, test)); } - // Output data. + // Report results. cout << test_names.size() << " added symbols " << endl; for (size_t j = 0; j < test_names.size() ; ++j) - cout << '\t' << test_names[j] << endl; + report_symbol_info(test_symbols[test_names[j].c_str()], j + 1); cout << missing_names.size() << " missing symbols " << endl; for (size_t j = 0; j < missing_names.size() ; ++j) - cout << '\t' << missing_names[j] << endl; + report_symbol_info(baseline_symbols[missing_names[j].c_str()], j + 1); cout << incompatible.size() << " incompatible symbols " << endl; for (size_t j = 0; j < incompatible.size() ; ++j) { - cout << "baseline symbol_info:" << endl; - cout << incompatible[j].first << endl; - cout << "test symbol_info:" << endl; - cout << incompatible[j].second << endl; + // First, report name. + const symbol_info& base = incompatible[j].first; + const symbol_info& test = incompatible[j].second; + report_symbol_info(test, j + 1); + + // Second, report reason or reasons incompatible. + check_compatible(base, test, true); } return 0;