This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] abi work


Patches to make the output of 'make check-abi' a bit more sane, by request.

Now looks like:

0 added symbols 
1 missing symbols 
	1
	symbol
	_ZNSt24__default_alloc_templateILb1ELi0EE10reallocateEPvjj
	demangled symbol
	std::__default_alloc_template<true, 0>::reallocate(void*, unsigned, uns
gned)

0 incompatible symbols 

I've also re-added some missing symbols. Now there is only one
measured difference between mainline and the 3.2.0 library
ABI. Discussions on getting back to zero will wait for Phil's return.

Also updates to the ABI docs from feedback this weekend.

A similar patch will go into gcc-3_2-branch.

-benjamin

2002-09-09  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/configopts.html: Change grouping. Note ABI impacts.
	Update information for locale model defaults.
	* docs/html/install.html: Update include directory
	information. 
	Update testing information. 
	Update linux issues for named locales.
	* docs/html/abi.txt: Fix typos.
	Add more info.

	* src/misc-inst.cc: Add missing instantiations.
	
	* testsuite/abi_check.cc: Make output results more verbose.
	
	* config/os/gnu-linux/ctype_base.h: Remove shadow headers injections.

Index: config/os/gnu-linux/ctype_base.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/gnu-linux/ctype_base.h,v
retrieving revision 1.1
diff -c -p -r1.1 ctype_base.h
*** config/os/gnu-linux/ctype_base.h	24 Jun 2002 05:49:19 -0000	1.1
--- config/os/gnu-linux/ctype_base.h	9 Sep 2002 20:20:30 -0000
***************
*** 1,6 ****
  // Locale support -*- C++ -*-
  
! // Copyright (C) 1997, 1998, 1999, 2000 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
--- 1,6 ----
  // Locale support -*- C++ -*-
  
! // 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,52 ****
    
  // 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.
--- 33,38 ----
Index: docs/html/abi.txt
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/docs/html/abi.txt,v
retrieving revision 1.6
diff -c -p -r1.6 abi.txt
*** docs/html/abi.txt	6 Sep 2002 19:52:38 -0000	1.6
--- docs/html/abi.txt	9 Sep 2002 20:20:32 -0000
*************** I. What is an ABI? What's covered? What'
*** 195,203 ****
    gcc-3.1.x tools, will meet the requirements above.
  
  - What configure options impact symbol versioning?
!   There is only one: --enable-symvers. For more information see:
    http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html
  
    In particular, libstdc++-v3/acinclude.m4 has a macro called
    GLIBCPP_ENABLE_SYMVERS that defaults to yes (or the argument passed
    in via --enable-symvers=foo). At that point, the macro attempts to
--- 195,211 ----
    gcc-3.1.x tools, will meet the requirements above.
  
  - What configure options impact symbol versioning?
! 
!   It turns out that most of the configure options that change default
!   behavior will impact the mangled names of exported symbols, and thus
!   impact versioning and compatibility.
! 
!   For more information on configure options, including ABI impacts, see:
    http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html
  
+   There is one flag that explicitly deals with symbol versioning:
+   --enable-symvers. 
+ 
    In particular, libstdc++-v3/acinclude.m4 has a macro called
    GLIBCPP_ENABLE_SYMVERS that defaults to yes (or the argument passed
    in via --enable-symvers=foo). At that point, the macro attempts to
*************** III. Versioning
*** 281,302 ****
  
  IV. Testing ABI changes
  
! Currently, there are formal tests for changes in the libstdc++ ABI,
! and in addition informal testing procedures. Work to develop these
! tests is ongoing.
  
! There is a formal method for checking the compiler parts of the C++
! ABI, donated by Intel. More information can be obtained
! <a href="http://developer.intel.com/software/products/opensource/";>here.</a>
  
! Also, it seems as if some members of the open source community are
! working on C++ ABI testers for the compiler. It is yet unspecified if
! these tools will be freely available, and able to be included in a GNU
! project. Please contact Mark Mitchell (mark@codesoucery.com) for more
! details, and current status.
  
  
! To test the library, there are two methods:
  
  One. 
  (Brendan Kehoe, Jeff Law suggestion to run 'make check-c++' two ways, 
--- 289,316 ----
  
  IV. Testing ABI changes
  
! Testing for GNU C++ ABI changes is composed of two distinct areas:
! testing the C++ compiler (g++) for compiler changes, and testing the
! C++ library (libstdc++) for library changes.
  
! Testing the C++ compiler ABI can be done various ways.
  
! One. 
! Intel ABI checker. More information can be obtained
! <a href="http://developer.intel.com/software/products/opensource/";>here.</a>
  
+ Two.
+ The second is yet unreleased, but has been announced on the gcc
+ mailing list. It is yet unspecified if these tools will be freely
+ available, and able to be included in a GNU project. Please contact
+ Mark Mitchell (mark@codesourcery.com) for more details, and current
+ status.
+ 
+ Three.
+ Involves using the vlad.consistency test framework. This has also been
+ discussed on the gcc mailing lists.
  
! Testing the C++ library ABI can also be done various ways.
  
  One. 
  (Brendan Kehoe, Jeff Law suggestion to run 'make check-c++' two ways, 
*************** Two.  
*** 310,320 ****
  Use the 'make check-abi' rule in the libstdc++-v3 Makefile. 
  
  This is a proactive check the library ABI. Currently, exported symbol
! names are checked against a last known good baseline. Currently, this
! baseline is keyed off of 3.2.0 binaries, as this was the last time the
! .so number was incremented. In addition, all exported names are
! demangled, and the exported objects are checked to make sure they are
! the same size as the same object in the baseline.
  
  In the future, more tests should be added. In particular, vtable
  information, offsets of data members in class objects, and other
--- 324,335 ----
  Use the 'make check-abi' rule in the libstdc++-v3 Makefile. 
  
  This is a proactive check the library ABI. Currently, exported symbol
! names that are either weak or defined are checked against a last known
! good baseline. Currently, this baseline is keyed off of 3.2.0
! binaries, as this was the last time the .so number was incremented. In
! addition, all exported names are demangled, and the exported objects
! are checked to make sure they are the same size as the same object in
! the baseline.
  
  In the future, more tests should be added. In particular, vtable
  information, offsets of data members in class objects, and other
*************** Another approach might be to use the -fd
*** 329,335 ****
  get information.
  (See g++/7470 on how this was used to find bugs.)
  
! Perhaps there are other Library ABI checkers. If so, please notify us.
  
  
  V. Issues not directly addressed, and possible suggestions
--- 344,351 ----
  get information.
  (See g++/7470 on how this was used to find bugs.)
  
! Perhaps there are other C++ ABI checkers. If so, please notify
! us. We'd like to know about them!
  
  
  V. Issues not directly addressed, and possible suggestions
*************** V. Issues not directly addressed, and po
*** 340,346 ****
  
    --enable-version-specific-runtime-libs
  
!   - Alexandre Olva proposal to have extended name attributes, modify ld
   
    - directory-level versioning
  
--- 356,362 ----
  
    --enable-version-specific-runtime-libs
  
!   - Alexandre Oliva proposal to have extended name attributes, modify ld
   
    - directory-level versioning
  
Index: docs/html/configopts.html
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/docs/html/configopts.html,v
retrieving revision 1.24
diff -c -p -r1.24 configopts.html
*** docs/html/configopts.html	5 Sep 2002 15:47:50 -0000	1.24
--- docs/html/configopts.html	9 Sep 2002 20:20:32 -0000
*************** options</a></h1>
*** 45,50 ****
--- 45,81 ----
       </p>
   </dd>
  
+  <dt><code>--enable-sjlj-exceptions  </code></dt>
+  <dd><p>Forces old, set-jump/long-jump exception handling model.  If
+         at all possible, the new, frame unwinding exception handling routines
+         should be used instead, as they significantly reduce both
+         runtime memory usage and executable size. This option can
+         change the library ABI.
+      </p>
+  </dd>
+ 
+  <dt><code>--enable-version-specific-runtime-libs  </code></dt>
+  <dd><p>Specify that run-time libraries should be installed in the
+         compiler-specific subdirectory (i.e.,
+         <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
+         instead of <code>${libdir}</code>.  This option is useful if you
+         intend to use several versions of gcc in parallel.  In addition,
+         libstdc++'s include files will be installed in
+         <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>,
+         unless you also specify
+        <code>--with-gxx-include-dir=<em>dirname</em></code> during configuration.
+      </p>
+  </dd>
+ 
+  <dt><code>--with-gxx-include-dir=&lt;include-files dir&gt;</code></dt>
+  <dd><p>Adds support for named libstdc++ include directory.  For instance,
+         the following puts all the libstdc++ headers into a directory
+         called &quot;2.97-20001008&quot; instead of the usual
+         &quot;g++-v3&quot;.
+      </p>
+         <pre>
+    --with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</pre> </dd>
+ 
   <dt><code>--enable-debug  </code></dt>
   <dd><p>The configure script will automatically detect the highest
          level of optimization that the compiler in use can use.
*************** options</a></h1>
*** 59,69 ****
  
   <dt><code>--enable-cstdio  </code></dt>
   <dd><p>This is an abbreviated form of <code>'--enable-cstdio=stdio'</code>
!         (described next).
       </p>
   </dd>
  
!  <dt><code>--enable-cstdio=LIB  </code></dt>
   <dd><p>Select a target-specific I/O package.  As of libstdc++-v3
          snapshot 3.0.96, the choices are 'libio' to specify the GNU
          I/O package (from
--- 90,100 ----
  
   <dt><code>--enable-cstdio  </code></dt>
   <dd><p>This is an abbreviated form of <code>'--enable-cstdio=stdio'</code>
!         (described next). This option can change the library ABI.
       </p>
   </dd>
  
!  <dt><code>--enable-cstdio=OPTION  </code></dt>
   <dd><p>Select a target-specific I/O package.  As of libstdc++-v3
          snapshot 3.0.96, the choices are 'libio' to specify the GNU
          I/O package (from
*************** options</a></h1>
*** 74,94 ****
       </p>
   </dd>
  
-  <dt><code>--enable-sjlj-exceptions  </code></dt>
-  <dd><p>Forces old, set-jump/long-jump exception handling model.  If
-         at all possible, the new, frame unwinding exception handling routines
-         should be used instead, as they significantly reduce both runtime
-         memory usage and executable size.
-      </p>
-  </dd>
- 
   <dt><code>--enable-clocale  </code></dt>
   <dd><p>This is an abbreviated form of <code>'--enable-clocale=generic'</code>
!         (described next).
       </p>
   </dd>
  
!  <dt><code>--enable-clocale=MODEL  </code></dt>
   <dd><p>Select a target-specific underlying locale package.  The
          choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix
          (IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets,
--- 105,117 ----
       </p>
   </dd>
  
   <dt><code>--enable-clocale  </code></dt>
   <dd><p>This is an abbreviated form of <code>'--enable-clocale=generic'</code>
!         (described next). This option can change the library ABI.
       </p>
   </dd>
  
!  <dt><code>--enable-clocale=OPTION  </code></dt>
   <dd><p>Select a target-specific underlying locale package.  The
          choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix
          (IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets,
*************** options</a></h1>
*** 96,132 ****
          library (langinfo/iconv/gettext) (from <a
          href="http://sources.redhat.com/glibc/";>glibc</a>, the GNU C
          library), or 'generic' to use a generic &quot;C&quot;
!         abstraction which consists of &quot;C&quot; locale info.  The
!         default is 'generic'.
       </p>
-  </dd>
  
!  <dt><code>--enable-c99  </code></dt>
!  <dd><p>The &quot;long long&quot; type was introduced in C99, along
!         with many other functions for wide characters, and math
!         classification macros, etc.  If enabled, all C99 functions not
!         specified by the C++ standard will be put into <code>namespace
!         __gnu_cxx</code>, and then all these names will
!         be injected into namespace std, so that C99 functions can be
!         used &quot;as if&quot; they were in the C++ standard (as they
!         will eventually be in some future revision of the standard,
!         without a doubt).  By default, C99 support is on, assuming the
!         configure probes find all the necessary functions and bits
!         necessary.
!     </p>
!  </dd>
! 
!  <dt><code>--enable-long-long  </code></dt>
!  <dd><p>The &quot;long long&quot; type was introduced in C99.  It is
!         provided as a GNU extension to C++98 in g++.  This flag builds
!         support for &quot;long long&quot; into the library (specialized
!         templates and the like for iostreams).  This option is on by default:
!         if enabled, users will have to either use the new-style &quot;C&quot;
!         headers by default (i.e., &lt;cmath&gt; not &lt;math.h&gt;)
!         or add appropriate compile-time flags to all compile lines to
!         allow &quot;C&quot; visibility of this feature (on GNU/Linux,
!         the flag is -D_ISOC99_SOURCE, which is added automatically via
!         CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE).
       </p>
   </dd>
  
--- 119,133 ----
          library (langinfo/iconv/gettext) (from <a
          href="http://sources.redhat.com/glibc/";>glibc</a>, the GNU C
          library), or 'generic' to use a generic &quot;C&quot;
!         abstraction which consists of &quot;C&quot; locale info.
       </p>
  
!      <p>As part of the configuration process, the "C" library is
!       probed both for sufficient vintage, and installed locale
!       data. If either of these elements are not present, the C++
!       locale model default to 'generic.' On glibc-based systems of
!       version 2.2.5 and above with installed locale files, 'gnu' is
!       automatically selected.
       </p>
   </dd>
  
*************** options</a></h1>
*** 140,182 ****
  
   <dt><code>--enable-threads  </code></dt>
   <dd><p>This is an abbreviated form of <code>'--enable-threads=yes'</code>
!         (described next).
       </p>
   </dd>
  
!  <dt><code>--enable-threads=LIB  </code></dt>
   <dd><p>Select a threading library.  A full description is given in the
          general <a href="http://gcc.gnu.org/install/configure.html";>compiler
          configuration instructions</a>.
       </p>
   </dd>
  
-  <dt><code>--enable-version-specific-runtime-libs  </code></dt>
-  <dd><p>Specify that run-time libraries should be installed in the
-         compiler-specific subdirectory (i.e.,
-         <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
-         instead of <code>${libdir}</code>.  This option is useful if you
-         intend to use several versions of gcc in parallel.  In addition,
-         libstdc++'s include files will be installed in
-         <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>,
-         unless you also specify
-        <code>--with-gxx-include-dir=<em>dirname</em></code> during configuration.
-      </p>
-  </dd>
- 
-  <dt><code>--with-gxx-include-dir=&lt;include-files dir&gt;</code></dt>
-  <dd><p>Adds support for named libstdc++ include directory.  For instance,
-         the following puts all the libstdc++ headers into a directory
-         called &quot;2.97-20001008&quot; instead of the usual
-         &quot;g++-v3&quot;.
-      </p>
-         <pre>
-    --with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</pre> </dd>
- 
   <dt><code>--enable-cxx-flags=FLAGS</code></dt>
   <dd><p>With this option, you can pass a string of -f (functionality)
!         flags to the compiler to use when building libstdc++.  FLAGS
!         is a quoted string of options, like
       </p>
          <pre>
    --enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</pre>
--- 141,162 ----
  
   <dt><code>--enable-threads  </code></dt>
   <dd><p>This is an abbreviated form of <code>'--enable-threads=yes'</code>
!         (described next). This option can change the library ABI.
       </p>
   </dd>
  
!  <dt><code>--enable-threads=OPTION  </code></dt>
   <dd><p>Select a threading library.  A full description is given in the
          general <a href="http://gcc.gnu.org/install/configure.html";>compiler
          configuration instructions</a>.
       </p>
   </dd>
  
   <dt><code>--enable-cxx-flags=FLAGS</code></dt>
   <dd><p>With this option, you can pass a string of -f (functionality)
!         flags to the compiler to use when building libstdc++. This
!         option can change the library ABI. FLAGS is a quoted string of
!         options, like
       </p>
          <pre>
    --enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</pre>
*************** options</a></h1>
*** 202,214 ****
       </p>
   </dd>
  
   <dt><code>--enable-c-mbchar  </code>[default]</dt>
   <dd><p>Certain template specializations are required for wide
          character conversion support.  This is tricky and currently
          changing rapidly, and can cause problems on new platforms.
          Disabling wide character specializations is useful for initial
          porting steps, but builds only a subset of what is required by
!         ISO.  By default, this option is on.
       </p>
   </dd>
  
--- 182,225 ----
       </p>
   </dd>
  
+  <dt><code>--enable-c99  </code></dt>
+  <dd><p>The &quot;long long&quot; type was introduced in C99, along
+         with many other functions for wide characters, and math
+         classification macros, etc.  If enabled, all C99 functions not
+         specified by the C++ standard will be put into <code>namespace
+         __gnu_cxx</code>, and then all these names will
+         be injected into namespace std, so that C99 functions can be
+         used &quot;as if&quot; they were in the C++ standard (as they
+         will eventually be in some future revision of the standard,
+         without a doubt).  By default, C99 support is on, assuming the
+         configure probes find all the necessary functions and bits
+         necessary. This option can change the library ABI.
+     </p>
+  </dd>
+ 
   <dt><code>--enable-c-mbchar  </code>[default]</dt>
   <dd><p>Certain template specializations are required for wide
          character conversion support.  This is tricky and currently
          changing rapidly, and can cause problems on new platforms.
          Disabling wide character specializations is useful for initial
          porting steps, but builds only a subset of what is required by
!         ISO.  By default, this option is on.  This option can change
!         the library ABI.
!      </p>
!  </dd>
! 
!  <dt><code>--enable-long-long  </code></dt>
!  <dd><p>The &quot;long long&quot; type was introduced in C99.  It is
!         provided as a GNU extension to C++98 in g++.  This flag builds
!         support for &quot;long long&quot; into the library (specialized
!         templates and the like for iostreams).  This option is on by default:
!         if enabled, users will have to either use the new-style &quot;C&quot;
!         headers by default (i.e., &lt;cmath&gt; not &lt;math.h&gt;)
!         or add appropriate compile-time flags to all compile lines to
!         allow &quot;C&quot; visibility of this feature (on GNU/Linux,
!         the flag is -D_ISOC99_SOURCE, which is added automatically via
!         CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE).
!         This option can change the library ABI. 
       </p>
   </dd>
  
Index: docs/html/install.html
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/docs/html/install.html,v
retrieving revision 1.18
diff -c -p -r1.18 install.html
*** docs/html/install.html	5 Sep 2002 15:47:50 -0000	1.18
--- docs/html/install.html	9 Sep 2002 20:20:32 -0000
***************
*** 92,109 ****
     <dl>
        <dt> linux </dt>
  
!       <dd>If you are using gcc 3.1 or later on linux, and are using
!       the gnu locale model (enabled by default for sufficient
!       versions of glibc), the following locales are used and tested
!       in the libstdc++ testsuites: en_HK, en_US, fr_FR, fr_FR@euro,
!       de_DE, de_DE@euro, ja_JP.eucjp, and it_IT. Failure to have the
!       underlying "C" library locale information installed will mean
!       that C++ named locales for the above regions will not work:
!       because of this, the libstdc++ testsuite will not pass the
!       named locale tests. If this isn't an issue, don't worry about
!       it. If named locales are needed, the underlying locale
!       information must be installed. Note that rebuilding libstdc++
!       after locales are installed is not necessary.
  
        <p> To install
        support for locales, do only one of the following: </p>
--- 92,119 ----
     <dl>
        <dt> linux </dt>
  
!       <dd>If gcc 3.1.0 or later on is being used on linux, an attempt
!       will be made to use "C" library functionality necessary for C++
!       named locale support. 
! 
!       <p>
!       The configure option --enable-clocale can be used force a
!       particular behavior.
!       </p>
! 
!       <p>
!       If the 'gnu' locale model is being used, the following locales
!       are used and tested in the libstdc++ testsuites: en_HK, en_US,
!       fr_FR, fr_FR@euro, de_DE, de_DE@euro, ja_JP.eucjp, and
!       it_IT. Failure to have the underlying "C" library locale
!       information installed will mean that C++ named locales for the
!       above regions will not work: because of this, the libstdc++
!       testsuite will not pass the named locale tests. If this isn't an
!       issue, don't worry about it. If named locales are needed, the
!       underlying locale information must be installed. Note that
!       rebuilding libstdc++ after the "C" locales are installed is not
!       necessary.
!       </p>
  
        <p> To install
        support for locales, do only one of the following: </p>
***************
*** 250,256 ****
     </p>
     <pre>
     lib/
!    include/g++-v3/
        backward/
        bits/
        <em>cpu-vendor-os</em>/bits/
--- 260,266 ----
     </p>
     <pre>
     lib/
!    include/c++/<em>gcc-version</em>
        backward/
        bits/
        <em>cpu-vendor-os</em>/bits/
***************
*** 272,277 ****
--- 282,303 ----
        <a href="faq/index.html#2_4">FAQ 2.4</a> for which files to examine.
     </p>
  
+    <p> In addition, there are some testing options that are mostly of
+    interest to library maintainers and system integrators. As such,
+    these tests may not work on all cpu and host combinations. These
+    options include, but are not necessarily limited to, the following:
+ 
+    <p>The library ABI can be tested using</p>
+    <pre>
+    make check-abi</pre>
+ 
+    <p>The library can also be tested using a bash script, instead of
+    the default dejagnu test harness</p>
+    <pre>
+    make check-script</pre>
+    or
+    <pre>
+    make check-script-install</pre>
  
  <hr />
  <h2><a name="usage">Using the library</a></h2>
Index: src/misc-inst.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/misc-inst.cc,v
retrieving revision 1.18
diff -c -p -r1.18 misc-inst.cc
*** src/misc-inst.cc	1 Jul 2002 19:58:42 -0000	1.18
--- src/misc-inst.cc	9 Sep 2002 20:20:33 -0000
*************** namespace std
*** 67,70 ****
--- 67,85 ----
      basic_istream<wchar_t>& 
      getline(basic_istream<wchar_t>&, wstring&);
  #endif
+ 
+ #if 1
+   // XXX
+   // 2002-05-24 These are no longer needed and should eventually be deleted.
+   template 
+     string* 
+     __uninitialized_fill_n_aux<string*, size_t, string>
+     (string*, size_t, string const &, __false_type);
+ 
+   template 
+     string* 
+     __uninitialized_copy_aux<vector<string>::const_iterator, string *>
+     (vector<string>::const_iterator, vector<string>::const_iterator, 
+      string*, __false_type);
+ #endif
  } // namespace std
Index: testsuite/abi_check.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/abi_check.cc,v
retrieving revision 1.5
diff -c -p -r1.5 abi_check.cc
*** testsuite/abi_check.cc	1 Sep 2002 18:09:18 -0000	1.5
--- testsuite/abi_check.cc	9 Sep 2002 20:20:34 -0000
*************** struct symbol_info
*** 56,79 ****
  };
  
  bool 
! operator==(const symbol_info& lhs, const symbol_info& rhs)
  {
    bool ret = true;
  
    // Check to see if symbol_infos are compatible.
!   ret &= lhs.type == rhs.type;
!   ret &= lhs.name == rhs.name;
!   ret &= lhs.size == rhs.size;
  
    // Expect something more sophisticated eventually.
!   ret &= lhs.version == rhs.version;
    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)
--- 56,109 ----
  };
  
  bool 
! 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.
!   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.
!   if (lhs.version != rhs.version)
!     {
!       ret = false;
!       if (verbose)
! 	{
! 	  cout << tab << "incompatible versions" << endl;
! 	}
!     }
! 
    return ret;
  }
  
  template<typename _CharT, typename _Traits>
    std::basic_ostream<_CharT, _Traits>&
    operator<<(std::basic_ostream<_CharT, _Traits>& os, symbol_info& si)
*************** typedef std::deque<std::string>				symbo
*** 188,195 ****
  typedef __gnu_cxx::hash_map<const char*, symbol_info> 	symbol_infos;
  
  void
! collect_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
--- 218,225 ----
  typedef __gnu_cxx::hash_map<const char*, symbol_info> 	symbol_infos;
  
  void
! 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
*************** collect_symbol_data(const char* file, sy
*** 213,218 ****
--- 243,263 ----
      }
  }
  
+ 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)
  {
*************** int main(int argc, char** argv)
*** 275,282 ****
    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);
  
    // Basic sanity check. (Was: error checking, what's that?)
    const symbol_names::size_type baseline_size = baseline_names.size();
--- 320,327 ----
    symbol_names  baseline_names;
    symbol_infos  test_symbols;
    symbol_names  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();
*************** int main(int argc, char** argv)
*** 323,350 ****
    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));
      }
  
!   // Output data.
    cout << test_names.size() << " added symbols " << endl;
    for (size_t j = 0; j < test_names.size() ; ++j)
!     cout << '\t' << test_names[j] << endl;
  
    cout << missing_names.size() << " missing symbols " << endl;
    for (size_t j = 0; j < missing_names.size() ; ++j)
!     cout << '\t' << missing_names[j] << endl;
  
    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;
      }
  
    return 0;
--- 368,398 ----
    vector<symbol_pair> incompatible;
    for (size_t i = 0; i < shared_size; ++i)
      {
!       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));
      }
  
!   // Report results.
    cout << test_names.size() << " added symbols " << endl;
    for (size_t j = 0; j < test_names.size() ; ++j)
!     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)
!     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)
      {
!       // 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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]