]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
misc-inst.cc: Remove some instantiations.
authorBenjamin Kosnik <bkoz@redhat.com>
Mon, 9 Sep 2002 20:58:40 +0000 (20:58 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Mon, 9 Sep 2002 20:58:40 +0000 (20:58 +0000)
2002-09-09  Benjamin Kosnik  <bkoz@redhat.com>

* 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

libstdc++-v3/ChangeLog
libstdc++-v3/config/os/gnu-linux/bits/ctype_base.h
libstdc++-v3/src/misc-inst.cc
libstdc++-v3/testsuite/abi_check.cc

index f8a26dec0691f655d9dd67e568c29fd17ff8fd23..7768faeadffac70c91f82a9cc0b9e459e644f7af 100644 (file)
@@ -1,3 +1,11 @@
+2002-09-09  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * 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  <jakub@redhat.com>
 
        * config/locale/generic/messages_members.cc: Add specialization for
index 50a5f797a4cd063c85ba67e1dd5e4a11e1b24a05..a431f971c9ba4d9175b9d6ca0b45cbbd9fdd0e42 100644 (file)
@@ -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
   
 // 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.
index 5576d2cb22a7d34e1844214c2ba0f15d93efecdd..f4f2ab1566e4544062ff28d01f288f62093a3801 100644 (file)
@@ -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, char_traits<char> > char_match;
-
-  template 
-    const char*  
-    find_if<const char *, char_match>
-    (const char *, const char *, char_match, random_access_iterator_tag);
-
-#ifdef _GLIBCPP_USE_WCHAR_T
-  typedef  _Char_traits_match<wchar_t, char_traits<wchar_t> > wchar_match;
-
-  template const wchar_t*  
-    find_if<const wchar_t*, wchar_match>
-    (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<string*, size_t, string>
index 10c300c853d1d0f1b708c26ff90463ede0fcea1b..fd030063d0c001ee2e82979f5b406c1b4221bb78 100644 (file)
@@ -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<typename _CharT, typename _Traits>
   std::basic_ostream<_CharT, _Traits>&
   operator<<(std::basic_ostream<_CharT, _Traits>& os, symbol_info& si)
@@ -188,8 +218,8 @@ typedef std::deque<std::string>                             symbol_names;
 typedef __gnu_cxx::hash_map<const char*, symbol_info>  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<symbol_pair> 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;