From a12b971e9b6b14c3ad29dbd4f5a70bf1fc35c4a2 Mon Sep 17 00:00:00 2001 From: bkoz Date: Tue, 5 Jan 2010 20:51:05 +0000 Subject: 2010-01-05 Benjamin Kosnik * doc/xml/manual/evolution.xml: Update for 4.4 and 4.5 releases. * doc/html: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155661 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/doc/html/manual/abi.html | 90 +++--- libstdc++-v3/doc/html/manual/algorithms.html | 8 +- libstdc++-v3/doc/html/manual/api.html | 117 ++++++-- .../doc/html/manual/appendix_contributing.html | 40 +-- libstdc++-v3/doc/html/manual/appendix_free.html | 8 +- libstdc++-v3/doc/html/manual/appendix_gfdl.html | 34 +-- libstdc++-v3/doc/html/manual/appendix_gpl.html | 40 +-- libstdc++-v3/doc/html/manual/appendix_porting.html | 30 +- libstdc++-v3/doc/html/manual/associative.html | 28 +- libstdc++-v3/doc/html/manual/auto_ptr.html | 6 +- libstdc++-v3/doc/html/manual/backwards.html | 86 +++--- libstdc++-v3/doc/html/manual/bitmap_allocator.html | 64 ++--- libstdc++-v3/doc/html/manual/bitset.html | 20 +- libstdc++-v3/doc/html/manual/bk01ix01.html | 7 +- libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html | 4 +- libstdc++-v3/doc/html/manual/bk01pt02pr01.html | 4 +- libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt03ch08.html | 6 +- libstdc++-v3/doc/html/manual/bk01pt05ch13.html | 4 +- libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html | 6 +- libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html | 4 +- libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html | 16 +- libstdc++-v3/doc/html/manual/bk01pt08ch19.html | 6 +- libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html | 8 +- libstdc++-v3/doc/html/manual/bk01pt09ch20.html | 4 +- libstdc++-v3/doc/html/manual/bk01pt09pr02.html | 8 +- libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html | 16 +- libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html | 4 +- libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html | 10 +- libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html | 70 ++--- libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html | 8 +- libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html | 14 +- libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html | 26 +- libstdc++-v3/doc/html/manual/bk01pt12ch32s03.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt12ch32s04.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt12ch32s05.html | 12 +- libstdc++-v3/doc/html/manual/bk01pt12ch32s06.html | 18 +- libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html | 302 ++++++++++----------- libstdc++-v3/doc/html/manual/bk01pt12ch34s02.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt12ch34s03.html | 4 +- libstdc++-v3/doc/html/manual/bk01pt12ch41s02.html | 8 +- libstdc++-v3/doc/html/manual/bk01pt12ch41s03.html | 2 +- libstdc++-v3/doc/html/manual/bk01pt12pr03.html | 8 +- libstdc++-v3/doc/html/manual/bugs.html | 24 +- libstdc++-v3/doc/html/manual/codecvt.html | 70 ++--- libstdc++-v3/doc/html/manual/complex.html | 6 +- libstdc++-v3/doc/html/manual/configure.html | 2 +- libstdc++-v3/doc/html/manual/containers.html | 6 +- libstdc++-v3/doc/html/manual/containers_and_c.html | 6 +- libstdc++-v3/doc/html/manual/debug.html | 18 +- libstdc++-v3/doc/html/manual/debug_mode.html | 8 +- libstdc++-v3/doc/html/manual/diagnostics.html | 6 +- .../doc/html/manual/documentation_style.html | 36 +-- libstdc++-v3/doc/html/manual/dynamic_memory.html | 18 +- libstdc++-v3/doc/html/manual/exceptions.html | 4 +- libstdc++-v3/doc/html/manual/ext_algorithms.html | 6 +- libstdc++-v3/doc/html/manual/ext_allocators.html | 20 +- .../doc/html/manual/ext_compile_checks.html | 6 +- libstdc++-v3/doc/html/manual/ext_concurrency.html | 20 +- libstdc++-v3/doc/html/manual/ext_containers.html | 6 +- libstdc++-v3/doc/html/manual/ext_demangling.html | 6 +- libstdc++-v3/doc/html/manual/ext_io.html | 18 +- libstdc++-v3/doc/html/manual/ext_iterators.html | 6 +- libstdc++-v3/doc/html/manual/ext_numerics.html | 4 +- libstdc++-v3/doc/html/manual/ext_utilities.html | 16 +- libstdc++-v3/doc/html/manual/extensions.html | 6 +- libstdc++-v3/doc/html/manual/facets.html | 34 +-- libstdc++-v3/doc/html/manual/fstreams.html | 4 +- libstdc++-v3/doc/html/manual/functors.html | 4 +- .../doc/html/manual/fundamental_types.html | 32 +-- .../manual/generalized_numeric_operations.html | 6 +- libstdc++-v3/doc/html/manual/internals.html | 16 +- libstdc++-v3/doc/html/manual/intro.html | 8 +- libstdc++-v3/doc/html/manual/io.html | 6 +- libstdc++-v3/doc/html/manual/io_and_c.html | 4 +- libstdc++-v3/doc/html/manual/iostream_objects.html | 4 +- libstdc++-v3/doc/html/manual/iterators.html | 6 +- libstdc++-v3/doc/html/manual/license.html | 8 +- libstdc++-v3/doc/html/manual/locales.html | 38 +-- libstdc++-v3/doc/html/manual/localization.html | 6 +- libstdc++-v3/doc/html/manual/make.html | 2 +- libstdc++-v3/doc/html/manual/memory.html | 68 ++--- libstdc++-v3/doc/html/manual/messages.html | 62 ++--- libstdc++-v3/doc/html/manual/numerics.html | 6 +- libstdc++-v3/doc/html/manual/numerics_and_c.html | 4 +- libstdc++-v3/doc/html/manual/pairs.html | 4 +- libstdc++-v3/doc/html/manual/parallel_mode.html | 12 +- libstdc++-v3/doc/html/manual/profile_mode.html | 44 +-- libstdc++-v3/doc/html/manual/sequences.html | 10 +- libstdc++-v3/doc/html/manual/setup.html | 16 +- libstdc++-v3/doc/html/manual/shared_ptr.html | 36 +-- .../doc/html/manual/source_code_style.html | 12 +- .../doc/html/manual/source_design_notes.html | 4 +- .../doc/html/manual/source_organization.html | 4 +- libstdc++-v3/doc/html/manual/spine.html | 14 +- libstdc++-v3/doc/html/manual/status.html | 50 ++-- libstdc++-v3/doc/html/manual/streambufs.html | 4 +- libstdc++-v3/doc/html/manual/strings.html | 6 +- libstdc++-v3/doc/html/manual/stringstreams.html | 4 +- libstdc++-v3/doc/html/manual/support.html | 6 +- libstdc++-v3/doc/html/manual/termination.html | 12 +- libstdc++-v3/doc/html/manual/test.html | 254 +++++++++++++---- libstdc++-v3/doc/html/manual/traits.html | 4 +- libstdc++-v3/doc/html/manual/using.html | 16 +- .../doc/html/manual/using_concurrency.html | 28 +- libstdc++-v3/doc/html/manual/using_exceptions.html | 42 +-- libstdc++-v3/doc/html/manual/using_headers.html | 24 +- libstdc++-v3/doc/html/manual/using_macros.html | 4 +- libstdc++-v3/doc/html/manual/using_namespaces.html | 16 +- libstdc++-v3/doc/html/manual/utilities.html | 6 +- libstdc++-v3/doc/html/manual/vector.html | 4 +- .../doc/html/manual/verbose_termination.html | 6 +- 120 files changed, 1344 insertions(+), 1108 deletions(-) (limited to 'libstdc++-v3/doc/html/manual') diff --git a/libstdc++-v3/doc/html/manual/abi.html b/libstdc++-v3/doc/html/manual/abi.html index 7d11f768464..8bc449bc15c 100644 --- a/libstdc++-v3/doc/html/manual/abi.html +++ b/libstdc++-v3/doc/html/manual/abi.html @@ -1,10 +1,10 @@ -ABI Policy and Guidelines

ABI Policy and Guidelines

+

The C++ Interface

C++ applications often dependent on specific language support routines, say for throwing exceptions, or catching exceptions, and perhaps also dependent on features in the C++ Standard Library. @@ -42,9 +42,9 @@ library ABI, which is the compilation of a given library API by a given compiler ABI. In a nutshell:

- “ + library API + compiler ABI = library ABI - ” +

The library ABI is mostly of interest for end-users who have unresolved symbols and are linking dynamically to the C++ Standard @@ -58,10 +58,10 @@ given compiler ABI. In a nutshell: To use a specific version of the C++ ABI, one must use a corresponding GNU C++ toolchain (i.e., g++ and libstdc++) that implements the C++ ABI in question. -

Versioning

The C++ interface has evolved throughout the history of the GNU +

Versioning

The C++ interface has evolved throughout the history of the GNU C++ toolchain. With each release, various details have been changed so as to give distinct versions to the C++ interface. -

Goals

Extending existing, stable ABIs. Versioning gives subsequent +

Goals

Extending existing, stable ABIs. Versioning gives subsequent releases of library binaries the ability to add new symbols and add functionality, all the while retaining compatibility with the previous releases in the series. Thus, program binaries linked with the initial @@ -75,7 +75,7 @@ binary in a release series (with additional symbols added), substitute in the initial release of the library binary, and remain link compatible.

Allows multiple, incompatible ABIs to coexist at the same time. -

History

+

History

How can this complexity be managed? What does C++ versioning mean? Because library and compiler changes often make binaries compiled with one version of the GNU tools incompatible with binaries @@ -84,17 +84,17 @@ compatible. easier.

The following techniques are used: -

  1. Release versioning on the libgcc_s.so binary.

    This is implemented via file names and the ELF +

    1. Release versioning on the libgcc_s.so binary.

      This is implemented via file names and the ELF DT_SONAME mechanism (at least on ELF systems). It is versioned as follows: -

      • gcc-3.0.0: libgcc_s.so.1

      • gcc-3.0.1: libgcc_s.so.1

      • gcc-3.0.2: libgcc_s.so.1

      • gcc-3.0.3: libgcc_s.so.1

      • gcc-3.0.4: libgcc_s.so.1

      • gcc-3.1.0: libgcc_s.so.1

      • gcc-3.1.1: libgcc_s.so.1

      • gcc-3.2.0: libgcc_s.so.1

      • gcc-3.2.1: libgcc_s.so.1

      • gcc-3.2.2: libgcc_s.so.1

      • gcc-3.2.3: libgcc_s.so.1

      • gcc-3.3.0: libgcc_s.so.1

      • gcc-3.3.1: libgcc_s.so.1

      • gcc-3.3.2: libgcc_s.so.1

      • gcc-3.3.3: libgcc_s.so.1

      • gcc-3.4.x, gcc-4.[0-3].x: on m68k-linux and +

        • gcc-3.0.0: libgcc_s.so.1

        • gcc-3.0.1: libgcc_s.so.1

        • gcc-3.0.2: libgcc_s.so.1

        • gcc-3.0.3: libgcc_s.so.1

        • gcc-3.0.4: libgcc_s.so.1

        • gcc-3.1.0: libgcc_s.so.1

        • gcc-3.1.1: libgcc_s.so.1

        • gcc-3.2.0: libgcc_s.so.1

        • gcc-3.2.1: libgcc_s.so.1

        • gcc-3.2.2: libgcc_s.so.1

        • gcc-3.2.3: libgcc_s.so.1

        • gcc-3.3.0: libgcc_s.so.1

        • gcc-3.3.1: libgcc_s.so.1

        • gcc-3.3.2: libgcc_s.so.1

        • gcc-3.3.3: libgcc_s.so.1

        • gcc-3.4.x, gcc-4.[0-5].x: on m68k-linux and hppa-linux this is either libgcc_s.so.1 (when configuring --with-sjlj-exceptions) or libgcc_s.so.2. For all - others, this is libgcc_s.so.1.

      • Symbol versioning on the libgcc_s.so binary.

        It is versioned with the following labels and version + others, this is libgcc_s.so.1.

    2. Symbol versioning on the libgcc_s.so binary.

      It is versioned with the following labels and version definitions, where the version definition is the maximum for a particular release. Labels are cumulative. If a particular release is not listed, it has the same version labels as the preceding - release.

      This corresponds to the mapfile: gcc/libgcc-std.ver

      • gcc-3.0.0: GCC_3.0

      • gcc-3.3.0: GCC_3.3

      • gcc-3.3.1: GCC_3.3.1

      • gcc-3.3.2: GCC_3.3.2

      • gcc-3.3.4: GCC_3.3.4

      • gcc-3.4.0: GCC_3.4

      • gcc-3.4.2: GCC_3.4.2

      • gcc-3.4.4: GCC_3.4.4

      • gcc-4.0.0: GCC_4.0.0

      • gcc-4.1.0: GCC_4.1.0

      • gcc-4.2.0: GCC_4.2.0

      • gcc-4.3.0: GCC_4.3.0

      • gcc-4.4.0: GCC_4.4.0

    3. + release.

      This corresponds to the mapfile: gcc/libgcc-std.ver

      • gcc-3.0.0: GCC_3.0

      • gcc-3.3.0: GCC_3.3

      • gcc-3.3.1: GCC_3.3.1

      • gcc-3.3.2: GCC_3.3.2

      • gcc-3.3.4: GCC_3.3.4

      • gcc-3.4.0: GCC_3.4

      • gcc-3.4.2: GCC_3.4.2

      • gcc-3.4.4: GCC_3.4.4

      • gcc-4.0.0: GCC_4.0.0

      • gcc-4.1.0: GCC_4.1.0

      • gcc-4.2.0: GCC_4.2.0

      • gcc-4.3.0: GCC_4.3.0

      • gcc-4.4.0: GCC_4.4.0

    4. Release versioning on the libstdc++.so binary, implemented in the same was as the libgcc_s.so binary above. Listed is the filename: DT_SONAME can be deduced from @@ -106,7 +106,7 @@ compatible. the table below, releases incompatible with the previous one are explicitly noted.

      It is versioned as follows: -

      • gcc-3.0.0: libstdc++.so.3.0.0

      • gcc-3.0.1: libstdc++.so.3.0.1

      • gcc-3.0.2: libstdc++.so.3.0.2

      • gcc-3.0.3: libstdc++.so.3.0.2 (See Note 1)

      • gcc-3.0.4: libstdc++.so.3.0.4

      • gcc-3.1.0: libstdc++.so.4.0.0 (Incompatible with previous)

      • gcc-3.1.1: libstdc++.so.4.0.1

      • gcc-3.2.0: libstdc++.so.5.0.0 (Incompatible with previous)

      • gcc-3.2.1: libstdc++.so.5.0.1

      • gcc-3.2.2: libstdc++.so.5.0.2

      • gcc-3.2.3: libstdc++.so.5.0.3 (See Note 2)

      • gcc-3.3.0: libstdc++.so.5.0.4

      • gcc-3.3.1: libstdc++.so.5.0.5

      • gcc-3.3.2: libstdc++.so.5.0.5

      • gcc-3.3.3: libstdc++.so.5.0.5

      • gcc-3.4.0: libstdc++.so.6.0.0 (Incompatible with previous)

      • gcc-3.4.1: libstdc++.so.6.0.1

      • gcc-3.4.2: libstdc++.so.6.0.2

      • gcc-3.4.3: libstdc++.so.6.0.3

      • gcc-3.4.4: libstdc++.so.6.0.3

      • gcc-3.4.5: libstdc++.so.6.0.3

      • gcc-3.4.6: libstdc++.so.6.0.3

      • gcc-4.0.0: libstdc++.so.6.0.4

      • gcc-4.0.1: libstdc++.so.6.0.5

      • gcc-4.0.2: libstdc++.so.6.0.6

      • gcc-4.0.3: libstdc++.so.6.0.7

      • gcc-4.1.0: libstdc++.so.6.0.7

      • gcc-4.1.1: libstdc++.so.6.0.8

      • gcc-4.1.2: libstdc++.so.6.0.8

      • gcc-4.2.0: libstdc++.so.6.0.9

      • gcc-4.2.1: libstdc++.so.6.0.9 (See Note 3)

      • gcc-4.2.2: libstdc++.so.6.0.9

      • gcc-4.2.3: libstdc++.so.6.0.9

      • gcc-4.2.4: libstdc++.so.6.0.9

      • gcc-4.3.0: libstdc++.so.6.0.10

      • gcc-4.3.1: libstdc++.so.6.0.10

      • gcc-4.3.2: libstdc++.so.6.0.10

      • gcc-4.3.3: libstdc++.so.6.0.10

      • gcc-4.4.0: libstdc++.so.6.0.11

      +

      • gcc-3.0.0: libstdc++.so.3.0.0

      • gcc-3.0.1: libstdc++.so.3.0.1

      • gcc-3.0.2: libstdc++.so.3.0.2

      • gcc-3.0.3: libstdc++.so.3.0.2 (See Note 1)

      • gcc-3.0.4: libstdc++.so.3.0.4

      • gcc-3.1.0: libstdc++.so.4.0.0 (Incompatible with previous)

      • gcc-3.1.1: libstdc++.so.4.0.1

      • gcc-3.2.0: libstdc++.so.5.0.0 (Incompatible with previous)

      • gcc-3.2.1: libstdc++.so.5.0.1

      • gcc-3.2.2: libstdc++.so.5.0.2

      • gcc-3.2.3: libstdc++.so.5.0.3 (See Note 2)

      • gcc-3.3.0: libstdc++.so.5.0.4

      • gcc-3.3.1: libstdc++.so.5.0.5

      • gcc-3.3.2: libstdc++.so.5.0.5

      • gcc-3.3.3: libstdc++.so.5.0.5

      • gcc-3.4.0: libstdc++.so.6.0.0 (Incompatible with previous)

      • gcc-3.4.1: libstdc++.so.6.0.1

      • gcc-3.4.2: libstdc++.so.6.0.2

      • gcc-3.4.3: libstdc++.so.6.0.3

      • gcc-3.4.4: libstdc++.so.6.0.3

      • gcc-3.4.5: libstdc++.so.6.0.3

      • gcc-3.4.6: libstdc++.so.6.0.3

      • gcc-4.0.0: libstdc++.so.6.0.4

      • gcc-4.0.1: libstdc++.so.6.0.5

      • gcc-4.0.2: libstdc++.so.6.0.6

      • gcc-4.0.3: libstdc++.so.6.0.7

      • gcc-4.1.0: libstdc++.so.6.0.7

      • gcc-4.1.1: libstdc++.so.6.0.8

      • gcc-4.1.2: libstdc++.so.6.0.8

      • gcc-4.2.0: libstdc++.so.6.0.9

      • gcc-4.2.1: libstdc++.so.6.0.9 (See Note 3)

      • gcc-4.2.2: libstdc++.so.6.0.9

      • gcc-4.2.3: libstdc++.so.6.0.9

      • gcc-4.2.4: libstdc++.so.6.0.9

      • gcc-4.3.0: libstdc++.so.6.0.10

      • gcc-4.3.1: libstdc++.so.6.0.10

      • gcc-4.3.2: libstdc++.so.6.0.10

      • gcc-4.3.3: libstdc++.so.6.0.10

      • gcc-4.3.4: libstdc++.so.6.0.10

      • gcc-4.4.0: libstdc++.so.6.0.11

      • gcc-4.4.1: libstdc++.so.6.0.12

      • gcc-4.4.2: libstdc++.so.6.0.13

      • gcc-4.5.0: libstdc++.so.6.0.14

      Note 1: Error should be libstdc++.so.3.0.3.

      Note 2: Not strictly required. @@ -114,7 +114,7 @@ compatible. Note 3: This release (but not previous or subsequent) has one known incompatibility, see 33678 in the GCC bug database. -

    5. Symbol versioning on the libstdc++.so binary.

      mapfile: libstdc++/config/linker-map.gnu

      It is versioned with the following labels and version +

    6. Symbol versioning on the libstdc++.so binary.

      mapfile: libstdc++/config/linker-map.gnu

      It is versioned with the following labels and version definitions, where the version definition is the maximum for a particular release. Note, only symbol which are newly introduced will use the maximum version definition. Thus, for release series @@ -124,7 +124,7 @@ compatible. GLIBCPP_3.2 for symbols that were introduced in the gcc-3.2.0 release.) If a particular release is not listed, it has the same version labels as the preceding release. -

      • gcc-3.0.0: (Error, not versioned)

      • gcc-3.0.1: (Error, not versioned)

      • gcc-3.0.2: (Error, not versioned)

      • gcc-3.0.3: (Error, not versioned)

      • gcc-3.0.4: (Error, not versioned)

      • gcc-3.1.0: GLIBCPP_3.1, CXXABI_1

      • gcc-3.1.1: GLIBCPP_3.1, CXXABI_1

      • gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2

      • gcc-3.2.1: GLIBCPP_3.2.1, CXXABI_1.2

      • gcc-3.2.2: GLIBCPP_3.2.2, CXXABI_1.2

      • gcc-3.2.3: GLIBCPP_3.2.2, CXXABI_1.2

      • gcc-3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1

      • gcc-3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1

      • gcc-3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1

      • gcc-3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1

      • gcc-3.4.0: GLIBCXX_3.4, CXXABI_1.3

      • gcc-3.4.1: GLIBCXX_3.4.1, CXXABI_1.3

      • gcc-3.4.2: GLIBCXX_3.4.2

      • gcc-3.4.3: GLIBCXX_3.4.3

      • gcc-4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1

      • gcc-4.0.1: GLIBCXX_3.4.5

      • gcc-4.0.2: GLIBCXX_3.4.6

      • gcc-4.0.3: GLIBCXX_3.4.7

      • gcc-4.1.1: GLIBCXX_3.4.8

      • gcc-4.2.0: GLIBCXX_3.4.9

      • gcc-4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2

      • gcc-4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3

    7. Incremental bumping of a compiler pre-defined macro, +

      • gcc-3.0.0: (Error, not versioned)

      • gcc-3.0.1: (Error, not versioned)

      • gcc-3.0.2: (Error, not versioned)

      • gcc-3.0.3: (Error, not versioned)

      • gcc-3.0.4: (Error, not versioned)

      • gcc-3.1.0: GLIBCPP_3.1, CXXABI_1

      • gcc-3.1.1: GLIBCPP_3.1, CXXABI_1

      • gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2

      • gcc-3.2.1: GLIBCPP_3.2.1, CXXABI_1.2

      • gcc-3.2.2: GLIBCPP_3.2.2, CXXABI_1.2

      • gcc-3.2.3: GLIBCPP_3.2.2, CXXABI_1.2

      • gcc-3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1

      • gcc-3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1

      • gcc-3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1

      • gcc-3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1

      • gcc-3.4.0: GLIBCXX_3.4, CXXABI_1.3

      • gcc-3.4.1: GLIBCXX_3.4.1, CXXABI_1.3

      • gcc-3.4.2: GLIBCXX_3.4.2

      • gcc-3.4.3: GLIBCXX_3.4.3

      • gcc-4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1

      • gcc-4.0.1: GLIBCXX_3.4.5

      • gcc-4.0.2: GLIBCXX_3.4.6

      • gcc-4.0.3: GLIBCXX_3.4.7

      • gcc-4.1.1: GLIBCXX_3.4.8

      • gcc-4.2.0: GLIBCXX_3.4.9

      • gcc-4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2

      • gcc-4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3

      • gcc-4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3

      • gcc-4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3

      • gcc-4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4

    8. Incremental bumping of a compiler pre-defined macro, __GXX_ABI_VERSION. This macro is defined as the version of the compiler v3 ABI, with g++ 3.0.x being version 100. This macro will be automatically defined whenever g++ is used (the curious can @@ -136,11 +136,11 @@ compatible. '-fabi-version' command line option.

      It is versioned as follows, where 'n' is given by '-fabi-version=n': -

      • gcc-3.0.x: 100

      • gcc-3.1.x: 100 (Error, should be 101)

      • gcc-3.2.x: 102

      • gcc-3.3.x: 102

      • gcc-3.4.x, gcc-4.[0-3].x: 102 (when n=1)

      • gcc-3.4.x, gcc-4.[0-3].x: 1000 + n (when n>1)

      • gcc-3.4.x, gcc-4.[0-3].x: 999999 (when n=0)

    9. Changes to the default compiler option for +

      • gcc-3.0.x: 100

      • gcc-3.1.x: 100 (Error, should be 101)

      • gcc-3.2.x: 102

      • gcc-3.3.x: 102

      • gcc-3.4.x, gcc-4.[0-5].x: 102 (when n=1)

      • gcc-3.4.x, gcc-4.[0-5].x: 1000 + n (when n>1)

      • gcc-3.4.x, gcc-4.[0-5].x: 999999 (when n=0)

    10. Changes to the default compiler option for -fabi-version.

      It is versioned as follows: -

      • gcc-3.0.x: (Error, not versioned)

      • gcc-3.1.x: (Error, not versioned)

      • gcc-3.2.x: -fabi-version=1

      • gcc-3.3.x: -fabi-version=1

      • gcc-3.4.x, gcc-4.[0-3].x: -fabi-version=2 (Incompatible with previous)

    11. Incremental bumping of a library pre-defined macro. For releases +

      • gcc-3.0.x: (Error, not versioned)

      • gcc-3.1.x: (Error, not versioned)

      • gcc-3.2.x: -fabi-version=1

      • gcc-3.3.x: -fabi-version=1

      • gcc-3.4.x, gcc-4.[0-5].x: -fabi-version=2 (Incompatible with previous)

    12. Incremental bumping of a library pre-defined macro. For releases before 3.4.0, the macro is __GLIBCPP__. For later releases, it's __GLIBCXX__. (The libstdc++ project generously changed from CPP to CXX throughout its source to allow the "C" pre-processor the CPP @@ -153,7 +153,7 @@ compatible. the same value as gcc/DATESTAMP.)

      It is versioned as follows: -

      • gcc-3.0.0: 20010615

      • gcc-3.0.1: 20010819

      • gcc-3.0.2: 20011023

      • gcc-3.0.3: 20011220

      • gcc-3.0.4: 20020220

      • gcc-3.1.0: 20020514

      • gcc-3.1.1: 20020725

      • gcc-3.2.0: 20020814

      • gcc-3.2.1: 20021119

      • gcc-3.2.2: 20030205

      • gcc-3.2.3: 20030422

      • gcc-3.3.0: 20030513

      • gcc-3.3.1: 20030804

      • gcc-3.3.2: 20031016

      • gcc-3.3.3: 20040214

      • gcc-3.4.0: 20040419

      • gcc-3.4.1: 20040701

      • gcc-3.4.2: 20040906

      • gcc-3.4.3: 20041105

      • gcc-3.4.4: 20050519

      • gcc-3.4.5: 20051201

      • gcc-3.4.6: 20060306

      • gcc-4.0.0: 20050421

      • gcc-4.0.1: 20050707

      • gcc-4.0.2: 20050921

      • gcc-4.0.3: 20060309

      • gcc-4.1.0: 20060228

      • gcc-4.1.1: 20060524

      • gcc-4.1.2: 20070214

      • gcc-4.2.0: 20070514

      • gcc-4.2.1: 20070719

      • gcc-4.2.2: 20071007

      • gcc-4.2.3: 20080201

      • gcc-4.2.4: 20080519

      • gcc-4.3.0: 20080306

      • gcc-4.3.1: 20080606

      • gcc-4.3.2: 20080827

      • gcc-4.3.3: 20090124

      • gcc-4.4.0: 20090421

    13. +

      • gcc-3.0.0: 20010615

      • gcc-3.0.1: 20010819

      • gcc-3.0.2: 20011023

      • gcc-3.0.3: 20011220

      • gcc-3.0.4: 20020220

      • gcc-3.1.0: 20020514

      • gcc-3.1.1: 20020725

      • gcc-3.2.0: 20020814

      • gcc-3.2.1: 20021119

      • gcc-3.2.2: 20030205

      • gcc-3.2.3: 20030422

      • gcc-3.3.0: 20030513

      • gcc-3.3.1: 20030804

      • gcc-3.3.2: 20031016

      • gcc-3.3.3: 20040214

      • gcc-3.4.0: 20040419

      • gcc-3.4.1: 20040701

      • gcc-3.4.2: 20040906

      • gcc-3.4.3: 20041105

      • gcc-3.4.4: 20050519

      • gcc-3.4.5: 20051201

      • gcc-3.4.6: 20060306

      • gcc-4.0.0: 20050421

      • gcc-4.0.1: 20050707

      • gcc-4.0.2: 20050921

      • gcc-4.0.3: 20060309

      • gcc-4.1.0: 20060228

      • gcc-4.1.1: 20060524

      • gcc-4.1.2: 20070214

      • gcc-4.2.0: 20070514

      • gcc-4.2.1: 20070719

      • gcc-4.2.2: 20071007

      • gcc-4.2.3: 20080201

      • gcc-4.2.4: 20080519

      • gcc-4.3.0: 20080306

      • gcc-4.3.1: 20080606

      • gcc-4.3.2: 20080827

      • gcc-4.3.3: 20090124

      • gcc-4.4.0: 20090421

      • gcc-4.4.1: 20090722

      • gcc-4.4.2: 20091015

    14. Incremental bumping of a library pre-defined macro, _GLIBCPP_VERSION. This macro is defined as the released version of the library, as a string literal. This is only implemented in @@ -166,7 +166,7 @@ compatible. of config.h.

      It is versioned as follows: -

      • gcc-3.0.0: "3.0.0"

      • gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")

      • gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")

      • gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")

      • gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")

      • gcc-3.1.0: "3.1.0"

      • gcc-3.1.1: "3.1.1"

      • gcc-3.2.0: "3.2"

      • gcc-3.2.1: "3.2.1"

      • gcc-3.2.2: "3.2.2"

      • gcc-3.2.3: "3.2.3"

      • gcc-3.3.0: "3.3"

      • gcc-3.3.1: "3.3.1"

      • gcc-3.3.2: "3.3.2"

      • gcc-3.3.3: "3.3.3"

      • gcc-3.4.x: "version-unused"

      • gcc-4.[0-3].x: "version-unused"

    15. +

      • gcc-3.0.0: "3.0.0"

      • gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")

      • gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")

      • gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")

      • gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")

      • gcc-3.1.0: "3.1.0"

      • gcc-3.1.1: "3.1.1"

      • gcc-3.2.0: "3.2"

      • gcc-3.2.1: "3.2.1"

      • gcc-3.2.2: "3.2.2"

      • gcc-3.2.3: "3.2.3"

      • gcc-3.3.0: "3.3"

      • gcc-3.3.1: "3.3.1"

      • gcc-3.3.2: "3.3.2"

      • gcc-3.3.3: "3.3.3"

      • gcc-3.4.x: "version-unused"

      • gcc-4.[0-5].x: "version-unused"

    16. Matching each specific C++ compiler release to a specific set of C++ include files. This is only implemented in gcc-3.1.1 releases and higher. @@ -178,13 +178,13 @@ compatible. file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before gcc-3.4.0).

      C++ includes are versioned as follows: -

      • gcc-3.0.0: include/g++-v3

      • gcc-3.0.1: include/g++-v3

      • gcc-3.0.2: include/g++-v3

      • gcc-3.0.3: include/g++-v3

      • gcc-3.0.4: include/g++-v3

      • gcc-3.1.0: include/g++-v3

      • gcc-3.1.1: include/c++/3.1.1

      • gcc-3.2.0: include/c++/3.2

      • gcc-3.2.1: include/c++/3.2.1

      • gcc-3.2.2: include/c++/3.2.2

      • gcc-3.2.3: include/c++/3.2.3

      • gcc-3.3.0: include/c++/3.3

      • gcc-3.3.1: include/c++/3.3.1

      • gcc-3.3.2: include/c++/3.3.2

      • gcc-3.3.3: include/c++/3.3.3

      • gcc-3.4.0: include/c++/3.4.0

      • gcc-3.4.1: include/c++/3.4.1

      • gcc-3.4.2: include/c++/3.4.2

      • gcc-3.4.3: include/c++/3.4.3

      • gcc-3.4.4: include/c++/3.4.4

      • gcc-3.4.5: include/c++/3.4.5

      • gcc-3.4.6: include/c++/3.4.6

      • gcc-4.0.0: include/c++/4.0.0

      • gcc-4.0.1: include/c++/4.0.1

      • gcc-4.0.2: include/c++/4.0.2

      • gcc-4.0.3: include/c++/4.0.3

      • gcc-4.1.0: include/c++/4.1.0

      • gcc-4.1.1: include/c++/4.1.1

      • gcc-4.1.2: include/c++/4.1.2

      • gcc-4.2.0: include/c++/4.2.0

      • gcc-4.2.1: include/c++/4.2.1

      • gcc-4.2.2: include/c++/4.2.2

      • gcc-4.2.3: include/c++/4.2.3

      • gcc-4.2.4: include/c++/4.2.4

      • gcc-4.3.0: include/c++/4.3.0

      • gcc-4.3.1: include/c++/4.3.1

      • gcc-4.3.3: include/c++/4.3.3

      • gcc-4.4.0: include/c++/4.4.0

    +

    • gcc-3.0.0: include/g++-v3

    • gcc-3.0.1: include/g++-v3

    • gcc-3.0.2: include/g++-v3

    • gcc-3.0.3: include/g++-v3

    • gcc-3.0.4: include/g++-v3

    • gcc-3.1.0: include/g++-v3

    • gcc-3.1.1: include/c++/3.1.1

    • gcc-3.2.0: include/c++/3.2

    • gcc-3.2.1: include/c++/3.2.1

    • gcc-3.2.2: include/c++/3.2.2

    • gcc-3.2.3: include/c++/3.2.3

    • gcc-3.3.0: include/c++/3.3

    • gcc-3.3.1: include/c++/3.3.1

    • gcc-3.3.2: include/c++/3.3.2

    • gcc-3.3.3: include/c++/3.3.3

    • gcc-3.4.0: include/c++/3.4.0

    • gcc-3.4.1: include/c++/3.4.1

    • gcc-3.4.2: include/c++/3.4.2

    • gcc-3.4.3: include/c++/3.4.3

    • gcc-3.4.4: include/c++/3.4.4

    • gcc-3.4.5: include/c++/3.4.5

    • gcc-3.4.6: include/c++/3.4.6

    • gcc-4.0.0: include/c++/4.0.0

    • gcc-4.0.1: include/c++/4.0.1

    • gcc-4.0.2: include/c++/4.0.2

    • gcc-4.0.3: include/c++/4.0.3

    • gcc-4.1.0: include/c++/4.1.0

    • gcc-4.1.1: include/c++/4.1.1

    • gcc-4.1.2: include/c++/4.1.2

    • gcc-4.2.0: include/c++/4.2.0

    • gcc-4.2.1: include/c++/4.2.1

    • gcc-4.2.2: include/c++/4.2.2

    • gcc-4.2.3: include/c++/4.2.3

    • gcc-4.2.4: include/c++/4.2.4

    • gcc-4.3.0: include/c++/4.3.0

    • gcc-4.3.1: include/c++/4.3.1

    • gcc-4.3.3: include/c++/4.3.3

    • gcc-4.3.4: include/c++/4.3.4

    • gcc-4.4.0: include/c++/4.4.0

    • gcc-4.4.1: include/c++/4.4.1

    • gcc-4.4.2: include/c++/4.4.2

    • gcc-4.5.0: include/c++/4.5.0

Taken together, these techniques can accurately specify interface and implementation changes in the GNU C++ tools themselves. Used properly, they allow both the GNU C++ tools implementation, and programs using them, an evolving yet controlled development that maintains backward compatibility. -

Prerequisites

+

Prerequisites

Minimum environment that supports a versioned ABI: A supported dynamic linker, a GNU linker of sufficient vintage to understand demangled C++ name globbing (ld), a shared executable compiled @@ -198,7 +198,7 @@ compatible. Most modern Linux and BSD versions, particularly ones using gcc-3.1.x tools and more recent vintages, will meet the requirements above. -

Configuring

+

Configuring

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. @@ -216,7 +216,7 @@ compatible. attempts to make sure that all the requirement for symbol versioning are in place. For more information, please consult acinclude.m4. -

Checking Active

+

Checking Active

When the GNU C++ library is being built with symbol versioning on, you should see the following at configure time for libstdc++: @@ -252,29 +252,29 @@ If you see symbols in the resulting output with "GLIBCXX_3" as part of the name, then the executable is versioned. Here's an example:

U _ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4 -

Allowed Changes

+

Allowed Changes

The following will cause the library minor version number to increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.3.0.5". -

  1. Adding an exported global or static data member

  2. Adding an exported function, static or non-virtual member function

  3. Adding an exported symbol or symbols by additional instantiations

+

  1. Adding an exported global or static data member

  2. Adding an exported function, static or non-virtual member function

  3. Adding an exported symbol or symbols by additional instantiations

Other allowed changes are possible. -

Prohibited Changes

+

Prohibited Changes

The following non-exhaustive list will cause the library major version number to increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.4.0.0". -

  1. Changes in the gcc/g++ compiler ABI

  2. Changing size of an exported symbol

  3. Changing alignment of an exported symbol

  4. Changing the layout of an exported symbol

  5. Changing mangling on an exported symbol

  6. Deleting an exported symbol

  7. Changing the inheritance properties of a type by adding or removing - base classes

  8. +

    1. Changes in the gcc/g++ compiler ABI

    2. Changing size of an exported symbol

    3. Changing alignment of an exported symbol

    4. Changing the layout of an exported symbol

    5. Changing mangling on an exported symbol

    6. Deleting an exported symbol

    7. Changing the inheritance properties of a type by adding or removing + base classes

    8. Changing the size, alignment, or layout of types specified in the C++ standard. These may not necessarily be instantiated or otherwise exported in the library binary, and include all the required locale facets, as well as things like std::basic_streambuf, et al. -

    9. Adding an explicit copy constructor or destructor to a +

    10. Adding an explicit copy constructor or destructor to a class that would otherwise have implicit versions. This will change the way the compiler deals with this class in by-value return statements or parameters: instead of being passing instances of this class in registers, the compiler will be forced to use memory. See this part of the C++ ABI documentation for further details. -

Implementation

  1. +

Testing

Single ABI Testing

+standard includes.

Testing

Single ABI Testing

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. @@ -388,7 +388,7 @@ and other detailed data is not displayed with this flag.

Perhaps there are other C++ ABI checkers. If so, please notify us. We'd like to know about them! -

Multiple ABI Testing

+

Multiple ABI Testing

A "C" application, dynamically linked to two shared libraries, liba, libb. The dependent library liba is C++ shared library compiled with gcc-3.3.x, and uses io, exceptions, locale, etc. The dependent library @@ -451,7 +451,7 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so. This resulting binary, when executed, will be able to safely use code from both liba, and the dependent libstdc++.so.6, and libb, with the dependent libstdc++.so.5. -

Outstanding Issues

+

Outstanding Issues

Some features in the C++ language make versioning especially difficult. In particular, compiler generated constructs such as implicit instantiations for templates, typeinfo information, and @@ -464,56 +464,56 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so. 24660: versioning weak symbols in libstdc++

19664: libstdc++ headers should have pop/push of the visibility around the declarations -

Bibliography

+

Bibliography

ABIcheck, a vague idea of checking ABI compatibility . - .

+ .

C++ ABI Reference . - .

+ .

Intel® Compilers for Linux* -Compatibility with the GNU Compilers . - .

+ .

Sun Solaris 2.9 : Linker and Libraries Guide (document 816-1386) . - .

+ .

Sun Solaris 2.9 : C++ Migration Guide (document 816-2459) . - .

+ .

How to Write Shared Libraries . Ulrich Drepper. - .

+ .

C++ ABI for the ARM Architecture . - .

+ .

Dynamic Shared Objects: Survey and Issues . ISO C++ J16/06-0046 . Benjamin Kosnik. - .

+ .

Versioning With Namespaces . ISO C++ J16/06-0083 . Benjamin Kosnik. - .

+ .

Binary Compatibility of Shared Libraries Implemented in C++ on GNU/Linux Systems . SYRCoSE 2009 diff --git a/libstdc++-v3/doc/html/manual/algorithms.html b/libstdc++-v3/doc/html/manual/algorithms.html index aaaa42c27ef..ea42224b5db 100644 --- a/libstdc++-v3/doc/html/manual/algorithms.html +++ b/libstdc++-v3/doc/html/manual/algorithms.html @@ -1,9 +1,9 @@ -Part IX.  Algorithms

Part IX.  Algorithms - -

+ +
diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html index f0f0e271f1a..56db4d32412 100644 --- a/libstdc++-v3/doc/html/manual/api.html +++ b/libstdc++-v3/doc/html/manual/api.html @@ -1,11 +1,11 @@ -API Evolution and Deprecation History

API Evolution and Deprecation History

A list of user-visible changes, in chronological order -

3.0

+

3.0

Extensions moved to include/ext.

Include files from the SGI/HP sources that pre-date the ISO standard @@ -14,7 +14,7 @@ the include/backward directory and a deprecated wa is added that notifies on inclusion (-Wno-deprecated deactivates the warning.)

Deprecated include backward/strstream added.

Removal of include builtinbuf.h, indstream.h, parsestream.h, PlotFile.h, SFile.h, stdiostream.h, and stream.h. -

3.1

+

3.1

Extensions from SGI/HP moved from namespace std to namespace __gnu_cxx. As part of this, the following @@ -26,15 +26,15 @@ Extensions to basic_filebuf introduced: ext/rb_tree.

Removal of ext/tree, moved to backward/tree.h. -

3.2

+

3.2

Symbol versioning introduced for shared library.

Removal of include backward/strstream.h.

Allocator changes. Change __malloc_alloc to malloc_allocator and __new_alloc to new_allocator.

For GCC releases from 2.95 through the 3.1 series, defining __USE_MALLOC on the gcc command line would change the default allocation strategy to instead use malloc and free. (This same functionality is now spelled _GLIBCXX_FORCE_NEW, see this page for details. -

Error handling in iostreams cleaned up, made consistent.

3.3

-

3.4

+

Error handling in iostreams cleaned up, made consistent.

3.3

+

3.4

Large file support.

Extensions for generic characters and char_traits added in ext/pod_char_traits.h. @@ -75,11 +75,11 @@ _Alloc_traits have been removed. __alloc to select an underlying allocator that satisfied memory allocation requests. The selection of this underlying allocator was not user-configurable. -

Table B.1. Extension Allocators

Allocator (3.4)Header (3.4)Allocator (3.[0-3])Header (3.[0-3])
__gnu_cxx::new_allocator<T>ext/new_allocator.hstd::__new_allocmemory
__gnu_cxx::malloc_allocator<T>ext/malloc_allocator.hstd::__malloc_alloc_template<int>memory
__gnu_cxx::debug_allocator<T>ext/debug_allocator.hstd::debug_alloc<T>memory
__gnu_cxx::__pool_alloc<T>ext/pool_allocator.hstd::__default_alloc_template<bool,int>memory
__gnu_cxx::__mt_alloc<T>ext/mt_allocator.h
__gnu_cxx::bitmap_allocator<T>ext/bitmap_allocator.h

Releases after gcc-3.4 have continued to add to the collection +

Table B.1. Extension Allocators

Allocator (3.4)Header (3.4)Allocator (3.[0-3])Header (3.[0-3])
__gnu_cxx::new_allocator<T>ext/new_allocator.hstd::__new_allocmemory
__gnu_cxx::malloc_allocator<T>ext/malloc_allocator.hstd::__malloc_alloc_template<int>memory
__gnu_cxx::debug_allocator<T>ext/debug_allocator.hstd::debug_alloc<T>memory
__gnu_cxx::__pool_alloc<T>ext/pool_allocator.hstd::__default_alloc_template<bool,int>memory
__gnu_cxx::__mt_alloc<T>ext/mt_allocator.h
__gnu_cxx::bitmap_allocator<T>ext/bitmap_allocator.h

Releases after gcc-3.4 have continued to add to the collection of available allocators. All of these new allocators are standard-style. The following table includes details, along with the first released version of GCC that included the extension allocator. -

Table B.2. Extension Allocators Continued

AllocatorIncludeVersion
__gnu_cxx::array_allocator<T>ext/array_allocator.h4.0.0
__gnu_cxx::throw_allocator<T>ext/throw_allocator.h4.2.0

+

Table B.2. Extension Allocators Continued

AllocatorIncludeVersion
__gnu_cxx::array_allocator<T>ext/array_allocator.h4.0.0
__gnu_cxx::throw_allocator<T>ext/throw_allocator.h4.2.0

Debug mode first appears.

Precompiled header support PCH support. @@ -89,7 +89,7 @@ Macro guard for changed, from _GLIBCPP_ to ext/stdio_sync_filebuf.h added.

Extension ext/demangle.h added. -

4.0

+

4.0

TR1 features first appear.

@@ -98,14 +98,14 @@ Extension allocator ext/array_allocator.h added. Extension codecvt specializations moved to ext/codecvt_specializations.h.

Removal of ext/demangle.h. -

4.1

+

4.1

Removal of cassert from all standard headers: now has to be explicitly included for std::assert calls.

Extensions for policy-based data structures first added. New includes, types, namespace pb_assoc.

Extensions for typelists added in ext/typelist.h.

Extension for policy-based basic_string first added: __gnu_cxx::__versa_string in ext/vstring.h. -

4.2

+

4.2

Default visibility attributes applied to namespace std. Support for -fvisibility.

TR1 random, complex, and C compatibility headers added.

Extensions for concurrent programming consolidated into ext/concurrence.h and ext/atomicity.h, @@ -120,24 +120,25 @@ types, namespace moved to __pb_ds. std::__debug and extensions in namespace __gnu_cxx::__debug.

Extensions added: ext/typelist.h and ext/throw_allocator.h. -

4.3

+

4.3

C++0X features first appear. -

TR1 regex and cmath's mathematical special function added.

+

TR1 regex and cmath's mathematical special function added. +

Backward include edit. -

  • Removed

    +

    • Removed

      algobase.h algo.h alloc.h bvector.h complex.h defalloc.h deque.h fstream.h function.h hash_map.h hash_set.h hashtable.h heap.h iomanip.h iostream.h istream.h iterator.h list.h map.h multimap.h multiset.h new.h ostream.h pair.h queue.h rope.h set.h slist.h stack.h streambuf.h stream.h tempbuf.h tree.h vector.h -

    • Added

      +

    • Added

      hash_map and hash_set -

    • Added in C++0x

      +

    • Added in C++0x

      auto_ptr.h and binders.h

    Header dependency streamlining. -

    • algorithm no longer includes climits, cstring, or iosfwd

    • bitset no longer includes istream or ostream, adds iosfwd

    • functional no longer includes cstddef

    • iomanip no longer includes istream, istream, or functional, adds ioswd

    • numeric no longer includes iterator

    • string no longer includes algorithm or memory

    • valarray no longer includes numeric or cstdlib

    • tr1/hashtable no longer includes memory or functional

    • tr1/memory no longer includes algorithm

    • tr1/random no longer includes algorithm or fstream

    +

    • algorithm no longer includes climits, cstring, or iosfwd

    • bitset no longer includes istream or ostream, adds iosfwd

    • functional no longer includes cstddef

    • iomanip no longer includes istream, istream, or functional, adds ioswd

    • numeric no longer includes iterator

    • string no longer includes algorithm or memory

    • valarray no longer includes numeric or cstdlib

    • tr1/hashtable no longer includes memory or functional

    • tr1/memory no longer includes algorithm

    • tr1/random no longer includes algorithm or fstream

    Debug mode for unordered_map and unordered_set.

    Parallel mode first appears. @@ -151,4 +152,84 @@ Parallel mode first appears. PCH binary files no longer installed. Instead, the source files are installed.

    Namespace pb_ds moved to __gnu_pb_ds. +

4.4

+

+C++0X features. +

  • + Added. +

    + atomic, + chrono, + condition_variable, + forward_list, + initializer_list, + mutex, + ratio, + thread +

  • + Updated and improved. +

    + algorithm, + system_error, + type_traits +

  • + Use of the GNU extension namespace association converted to inline namespaces. +

  • + Preliminary support for initializer_list + and defaulted and deleted constructors in container classes. +

  • + unique_ptr. +

  • + Support for new character types char16_t + and char32_t added + to char_traits, basic_string, numeric_limits, + and assorted compile-time type traits. +

  • + Support for string conversions to_string + and to_wstring. +

  • + Member functions taking string arguments were added to iostreams + including basic_filebuf, basic_ofstream, + and basic_ifstream. +

  • + Exception propagation support, + including exception_ptr, current_exception, copy_exception, + and rethrow_exception. +

+Uglification of try to __try +and catch to __catch. +

+Audit of internal mutex usage, conversion to funtions returning static +local mutex. +

Extensions +added: ext/pointer.h +and ext/extptr_allocator.h. Support +for non-standard pointer types has been added +to vector +and forward_list. +

4.5

+

+C++0X features. +

  • + Added. +

    + future, + random +

  • + Updated and improved. +

    + atomic, + system_error, + type_traits +

  • + Add support for explicit operators and standard layout types. +

+Profile mode first appears. +

+Support for decimal floating-point arithmetic, including decimal32, decimal64, and decimal128. +

+Python pretty-printers are added for use with appropriately-advanced versions of gdb. +

+Audit for application of function attributes notrow, const, pure, and noreturn. +

Extensions modified: ext/throw_allocator.h. In addition, experimental support was added for random serialization operators.

diff --git a/libstdc++-v3/doc/html/manual/appendix_contributing.html b/libstdc++-v3/doc/html/manual/appendix_contributing.html index b54faf1b14d..e58318e2e09 100644 --- a/libstdc++-v3/doc/html/manual/appendix_contributing.html +++ b/libstdc++-v3/doc/html/manual/appendix_contributing.html @@ -1,17 +1,17 @@ -Appendix A.  Contributing

Appendix A.  Contributing - +

The GNU C++ Library follows an open development model. Active contributors are assigned maintainer-ship responsibility, and given write access to the source repository. First time contributors should follow this procedure: -

Contributor Checklist

Reading

  • +

    Contributor Checklist

    Reading

    • Get and read the relevant sections of the C++ language specification. Copies of the full ISO 14882 standard are available on line via the ISO mirror site for committee @@ -24,30 +24,30 @@ here. (And if you've already registered with them, clicking this link will take you to directly to the place where you can buy the standard on-line.) -

    • +

    • The library working group bugs, and known defects, can be obtained here: http://www.open-std.org/jtc1/sc22/wg21 -

    • +

    • The newsgroup dedicated to standardization issues is comp.std.c++: this FAQ for this group is quite useful and can be found here . -

    • +

    • Peruse the GNU Coding Standards, and chuckle when you hit the part - about “Using Languages Other Than C”. -

    • + about Using Languages Other Than C. +

    • Be familiar with the extensions that preceded these general GNU rules. These style issues for libstdc++ can be found here. -

    • +

    • And last but certainly not least, read the library-specific information found here. -

    Assignment

    +

Assignment

Small changes can be accepted without a copyright assignment form on file. New code and additions to the library need completed copyright assignment form on file at the FSF. Note: your employer may be required @@ -56,10 +56,10 @@ Historically, the libstdc++ assignment form added the following question:

- “ + Which Belgian comic book character is better, Tintin or Asterix, and why? - ” +

While not strictly necessary, humoring the maintainers and answering this question would be appreciated. @@ -74,29 +74,29 @@ requesting an assignment form from , please cc the libstdc++ maintainer above so that progress can be monitored. -

Getting Sources

+

Submitting Patches

+

Submitting Patches

Every patch must have several pieces of information before it can be properly evaluated. Ideally (and to ensure the fastest possible response from the maintainers) it would have all of these pieces: -

  • +

    • A description of the bug and how your patch fixes this bug. For new features a description of the feature and your implementation. -

    • +

    • A ChangeLog entry as plain text; see the various ChangeLog files for format and content. If using you are using emacs as your editor, simply position the insertion point at the beginning of your change and hit CX-4a to bring up the appropriate ChangeLog entry. See--magic! Similar functionality also exists for vi. -

    • +

    • A testsuite submission or sample program that will easily and simply show the existing error or test new functionality. -

    • +

    • The patch itself. If you are accessing the SVN repository use svn update; svn diff NEW; else, use diff -cp OLD NEW ... If your @@ -105,7 +105,7 @@ diff. The SVN Tricks wiki page has information on customising the output of svn diff. -

    • +

    • When you have all these pieces, bundle them up in a mail message and send it to libstdc++@gcc.gnu.org. All patches and related discussion should be sent to the diff --git a/libstdc++-v3/doc/html/manual/appendix_free.html b/libstdc++-v3/doc/html/manual/appendix_free.html index 5b529f93e8e..2431858efd8 100644 --- a/libstdc++-v3/doc/html/manual/appendix_free.html +++ b/libstdc++-v3/doc/html/manual/appendix_free.html @@ -1,11 +1,11 @@ -Appendix C.  Free Software Needs Free Documentation

      Appendix C.  Free Software Needs Free Documentation - +

      The biggest deficiency in free operating systems is not in the software--it is the lack of good free manuals that we can include in @@ -120,5 +120,5 @@ that lists free books available from other publishers].

      Copyright © 2004, 2005, 2006, 2007 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

      Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice is preserved.

      Report any problems or suggestions to .

      diff --git a/libstdc++-v3/doc/html/manual/appendix_gfdl.html b/libstdc++-v3/doc/html/manual/appendix_gfdl.html index cbd35d59e4f..6b6e69ea86d 100644 --- a/libstdc++-v3/doc/html/manual/appendix_gfdl.html +++ b/libstdc++-v3/doc/html/manual/appendix_gfdl.html @@ -1,6 +1,6 @@ -Appendix E. GNU Free Documentation License

      Appendix E. GNU Free Documentation License

      +Appendix E. GNU Free Documentation License

      Appendix E. GNU Free Documentation License

      Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. Everyone is permitted to copy and @@ -173,36 +173,36 @@ filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -

      1. +

        1. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. -
        2. +
        3. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. -
        4. +
        5. State on the Title page the name of the publisher of the Modified Version, as the publisher. -
        6. +
        7. Preserve all the copyright notices of the Document. -
        8. +
        9. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. -
        10. +
        11. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. -
        12. +
        13. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. -
        14. +
        15. Include an unaltered copy of this License. -
        16. +
        17. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If @@ -210,7 +210,7 @@ stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. -
        18. +
        19. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was @@ -218,22 +218,22 @@ a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. -
        20. +
        21. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. -
        22. +
        23. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. -
        24. +
        25. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. -
        26. +
        27. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. -
        28. +
        29. Preserve any Warranty Disclaimers.

        If the Modified Version includes new front-matter sections or appendices @@ -391,5 +391,5 @@ software license, such as the GNU General Public License, to permit their use in free software.

      diff --git a/libstdc++-v3/doc/html/manual/appendix_gpl.html b/libstdc++-v3/doc/html/manual/appendix_gpl.html index 0f9a838f365..48c1f78e166 100644 --- a/libstdc++-v3/doc/html/manual/appendix_gpl.html +++ b/libstdc++-v3/doc/html/manual/appendix_gpl.html @@ -1,8 +1,8 @@ -Appendix D.  GNU General Public License version 3

      Appendix D.  +Appendix D.  GNU General Public License version 3

      Appendix D.  GNU General Public License version 3

      Version 3, 29 June 2007 @@ -76,7 +76,7 @@

      The precise terms and conditions for copying, distribution and modification follow. -

      +

      TERMS AND CONDITIONS

      0. Definitions. @@ -219,15 +219,15 @@ You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: -

      1. +

        1. The work must carry prominent notices stating that you modified it, and giving a relevant date. -

        2. +

        3. The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. -

        4. +

        5. You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the @@ -235,7 +235,7 @@ packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. -

        6. +

        7. If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need @@ -255,12 +255,12 @@ You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: -

          1. +

            1. Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. -

            2. +

            3. Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts @@ -271,12 +271,12 @@ price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. -

            4. +

            5. Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. -

            6. +

            7. Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no @@ -289,7 +289,7 @@ Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. -

            8. +

            9. Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under @@ -366,24 +366,24 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: -

              1. +

                1. Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or -

                2. +

                3. Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or -

                4. +

                5. Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or -

                6. +

                7. Limiting the use for publicity purposes of names of licensors or authors of the material; or -

                8. +

                9. Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or -

                10. +

                11. Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any @@ -617,7 +617,7 @@ waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. -

                  +

                  END OF TERMS AND CONDITIONS

                  How to Apply These Terms to Your New Programs diff --git a/libstdc++-v3/doc/html/manual/appendix_porting.html b/libstdc++-v3/doc/html/manual/appendix_porting.html index 037759421ee..842b335d7de 100644 --- a/libstdc++-v3/doc/html/manual/appendix_porting.html +++ b/libstdc++-v3/doc/html/manual/appendix_porting.html @@ -1,12 +1,12 @@ -Appendix B.  Porting and Maintenance

            Configure and Build Hacking

            Prerequisites

            As noted previously, certain other tools are necessary for hacking on files that control configure (configure.ac, @@ -17,7 +17,7 @@ in GCC try to stay in sync with each other in terms of versions of the auto-tools used, so please try to play nicely with the neighbors. -

            Overview: What Comes from Where

            +  

            Overview: What Comes from Where

               Dependency Graph Configure to Build Files
               

            Regenerate all generated files by using the command sequence @@ -29,7 +29,7 @@ the current requirements and your vendor's choice of installation names. -

            Storing Information in non-AC files (like configure.host)

            +

            Storing Information in non-AC files (like configure.host)

            Until that glorious day when we can use AC_TRY_LINK with a cross-compiler, we have to hardcode the results of what the tests would have shown if they could be run. So we have an inflexible @@ -51,7 +51,7 @@ for instance, but then we would need arguments to aclocal/autoconf to properly find them all when generating configure. I would discourage that. -

            Coding and Commenting Conventions

            +

            Coding and Commenting Conventions

            Most comments should use {octothorpes, shibboleths, hash marks, pound signs, whatever} rather than "dnl". Nearly all comments in configure.ac should. Comments inside macros written in ancilliary @@ -68,7 +68,7 @@ Do not use any $target* variables, such as $target_alias. The single exception is in configure.ac, for automake+dejagnu's sake. -

            The acinclude.m4 layout

            +

            The acinclude.m4 layout

            The nice thing about acinclude.m4/aclocal.m4 is that macros aren't actually performed/called/expanded/whatever here, just loaded. So we can arrange the contents however we like. As of this writing, @@ -139,14 +139,14 @@

            Things which we don't seem to use directly, but just has to be present otherwise stuff magically goes wonky. -

            GLIBCXX_ENABLE, the --enable maker

            +

            GLIBCXX_ENABLE, the --enable maker

            All the GLIBCXX_ENABLE_FOO macros use a common helper, GLIBCXX_ENABLE. (You don't have to use it, but it's easy.) The helper does two things for us: -

            1. +

              1. Builds the call to the AC_ARG_ENABLE macro, with --help text properly quoted and aligned. (Death to changequote!) -

              2. +

              3. Checks the result against a list of allowed possibilities, and signals a fatal error if there's no match. This means that the rest of the GLIBCXX_ENABLE_FOO macro doesn't need to test for @@ -168,13 +168,13 @@ GLIBCXX_ENABLE (FEATURE, DEFAULT, HELP-ARG, HELP-STRING) GLIBCXX_ENABLE (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c) GLIBCXX_ENABLE (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER) -

                • +

                  • FEATURE is the string that follows --enable. The results of the test (such as it is) will be in the variable $enable_FEATURE, where FEATURE has been squashed. Example: [extra-foo], controlled by the --enable-extra-foo option and stored in $enable_extra_foo. -

                  • +

                  • DEFAULT is the value to store in $enable_FEATURE if the user does not pass --enable/--disable. It should be one of the permitted values passed later. Examples: [yes], or @@ -185,7 +185,7 @@ For cases where we need to probe for particular models of things, it is useful to have an undocumented "auto" value here (see GLIBCXX_ENABLE_CLOCALE for an example). -

                  • +

                  • HELP-ARG is any text to append to the option string itself in the --help output. Examples: [] (i.e., an empty string, which appends nothing), [=BAR], which produces @@ -198,7 +198,7 @@ that's how you embed autoconf special characters in output text. They're called quadrigraphs and you should use them whenever necessary. -

                  • HELP-STRING is what you think it is. Do not include the +

                  • HELP-STRING is what you think it is. Do not include the "default" text like we used to do; it will be done for you by GLIBCXX_ENABLE. By convention, these are not full English sentences. Example: [turn on extra foo] diff --git a/libstdc++-v3/doc/html/manual/associative.html b/libstdc++-v3/doc/html/manual/associative.html index c68cf1e0280..06a9de6aa3a 100644 --- a/libstdc++-v3/doc/html/manual/associative.html +++ b/libstdc++-v3/doc/html/manual/associative.html @@ -1,18 +1,18 @@ -Chapter 17. Associative

                    Chapter 17. Associative

                    Insertion Hints

                    Section [23.1.2], Table 69, of the C++ standard lists this function for all of the associative containers (map, set, etc):

                           a.insert(p,t);
                        

                    where 'p' is an iterator into the container 'a', and 't' is the - item to insert. The standard says that “t is + item to insert. The standard says that t is inserted as close as possible to the position just prior to - p.” (Library DR #233 addresses this topic, + p. (Library DR #233 addresses this topic, referring to N1780. Since version 4.2 GCC implements the resolution to DR 233, so that insertions happen as close as possible to the hint. For @@ -31,25 +31,25 @@ than and less than refer to the results of the strict weak ordering imposed on the container by its comparison object, which defaults to (basically) - “<”. Using those phrases is semantically sloppy, + <. Using those phrases is semantically sloppy, but I didn't want to get bogged down in syntax. I assume that if you are intelligent enough to use your own comparison objects, - you are also intelligent enough to assign “greater” - and “lesser” their new meanings in the next + you are also intelligent enough to assign greater + and lesser their new meanings in the next paragraph. *grin*

                    If the hint parameter ('p' above) is equivalent to: -

                    • +

                      • begin(), then the item being inserted should have a key less than all the other keys in the container. The item will be inserted at the beginning of the container, becoming the new entry at begin(). -

                      • +

                      • end(), then the item being inserted should have a key greater than all the other keys in the container. The item will be inserted at the end of the container, becoming the new entry at end(). -

                      • +

                      • neither begin() nor end(), then: Let h be the entry in the container pointed to by hint, that is, h = *hint. Then @@ -59,10 +59,10 @@ h and h's predecessor.

                      For multimap and multiset, the - restrictions are slightly looser: “greater than” - should be replaced by “not less than”and “less - than” should be replaced by “not greater - than.” (Why not replace greater with + restrictions are slightly looser: greater than + should be replaced by not less thanand less + than should be replaced by not greater + than. (Why not replace greater with greater-than-or-equal-to? You probably could in your head, but the mathematicians will tell you that it isn't the same thing.)

                      diff --git a/libstdc++-v3/doc/html/manual/auto_ptr.html b/libstdc++-v3/doc/html/manual/auto_ptr.html index 88b3397b419..777264504bf 100644 --- a/libstdc++-v3/doc/html/manual/auto_ptr.html +++ b/libstdc++-v3/doc/html/manual/auto_ptr.html @@ -1,6 +1,6 @@ -auto_ptr

                      auto_ptr

                      Limitations

                      Explaining all of the fun and delicious things that can +auto_ptr

                      auto_ptr

                      Limitations

                      Explaining all of the fun and delicious things that can happen with misuse of the auto_ptr class template (called AP here) would take some time. Suffice it to say that the use of AP @@ -51,7 +51,7 @@ to die. AP is trivial to write, however, so you could write your own auto_array_ptr for that situation (in fact, this has been done many times; check the mailing lists, Usenet, Boost, etc). -

                      Use in Containers

                      +

                      Use in Containers

                      All of the containers described in the standard library require their contained types to have, among other things, a copy constructor like this: @@ -70,7 +70,7 @@

                      The resulting rule is simple: Never ever use a container of auto_ptr objects. The standard says that - “undefined” behavior is the result, but it is + undefined behavior is the result, but it is guaranteed to be messy.

                      To prevent you from doing this to yourself, the diff --git a/libstdc++-v3/doc/html/manual/backwards.html b/libstdc++-v3/doc/html/manual/backwards.html index 252d177d4aa..39b9d3880c5 100644 --- a/libstdc++-v3/doc/html/manual/backwards.html +++ b/libstdc++-v3/doc/html/manual/backwards.html @@ -1,9 +1,9 @@ -Backwards Compatibility

                      Backwards Compatibility

                      First

                      The first generation GNU C++ library was called libg++. It was a separate GNU project, although reliably paired with GCC. Rumors imply that it had a working relationship with at least two kinds of dinosaur. @@ -16,9 +16,9 @@ now and are well-supported, whereas genclass (mostly) predates them.) ISO Standard (e.g., statistical analysis). While there are a lot of really useful things that are used by a lot of people, the Standards Committee couldn't include everything, and so a lot of those -“obvious” classes didn't get included. -

                      Known Issues include many of the limitations of its immediate ancestor.

                      Portability notes and known implementation limitations are as follows.

                      No ios_base

                      At least some older implementations don't have std::ios_base, so you should use std::ios::badbit, std::ios::failbit and std::ios::eofbit and std::ios::goodbit. -

                      No cout in ostream.h, no cin in istream.h

                      +obvious classes didn't get included. +

                      Known Issues include many of the limitations of its immediate ancestor.

                      Portability notes and known implementation limitations are as follows.

                      No ios_base

                      At least some older implementations don't have std::ios_base, so you should use std::ios::badbit, std::ios::failbit and std::ios::eofbit and std::ios::goodbit. +

                      No cout in ostream.h, no cin in istream.h

                      In earlier versions of the standard, fstream.h, ostream.h @@ -32,7 +32,7 @@ archived. For the desperate, the GCC extensions page describes where to find the last libg++ source. The code is considered replaced and rewritten. -

                      Second

                      +

                      Second

                      The second generation GNU C++ library was called libstdc++, or libstdc++-v2. It spans the time between libg++ and pre-ISO C++ standardization and is usually associated with the following GCC @@ -44,7 +44,7 @@ considered replaced and rewritten. archived. The code is considered replaced and rewritten.

                      Portability notes and known implementation limitations are as follows. -

                      Namespace std:: not supported

                      +

                      Namespace std:: not supported

                      Some care is required to support C++ compiler and or library implementation that do not have the standard library in namespace std. @@ -74,7 +74,7 @@ considered replaced and rewritten.

                      Another pre-processor based approach is to define a macro NAMESPACE_STD, which is defined to either - “ ” or “std” based on a compile-type + or std based on a compile-type test. On GNU systems, this can be done with autotools by means of an autoconf test (see below) for HAVE_NAMESPACE_STD, then using that to set a value for the NAMESPACE_STD @@ -108,20 +108,20 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [ AC_DEFINE(HAVE_NAMESPACE_STD,,[Define if g++ supports namespace std. ]) fi ]) -

                      Illegal iterator usage

                      +

                      Illegal iterator usage

                      The following illustrate implementation-allowed illegal iterator use, and then correct use. -

                      • +

                        • you cannot do ostream::operator<<(iterator) to print the address of the iterator => use operator<< &*iterator instead -

                        • +

                        • you cannot clear an iterator's reference (iterator = 0) => use iterator = iterator_type(); -

                        • +

                        • if (iterator) won't work any more => use if (iterator != iterator_type()) -

                      isspace from cctype is a macro +

                    isspace from cctype is a macro

                    Glibc 2.0.x and 2.1.x define ctype.h functionality as macros (isspace, isalpha etc.). @@ -154,7 +154,7 @@ std:: (__ctype_b[(int) ( ( 'X' ) )] & (unsigned short int) _ISspace ) ; (ctype.h) and the definitions in namespace std:: (<cctype>). -

                    No vector::at, deque::at, string::at

                    +

                    No vector::at, deque::at, string::at

                    One solution is to add an autoconf-test for this:

                     AC_MSG_CHECKING(for container::at)
                    @@ -171,7 +171,7 @@ deque<int> test_deque(3);
                     test_deque.at(2);
                     vector<int> test_vector(2);
                     test_vector.at(1);
                    -string test_string(“test_string”);
                    +string test_string(test_string);
                     test_string.at(3);
                     ],
                     [AC_MSG_RESULT(yes)
                    @@ -180,7 +180,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
                     

                    If you are using other (non-GNU) compilers it might be a good idea to check for string::at separately. -

                    No std::char_traits<char>::eof

                    +

                    No std::char_traits<char>::eof

                    Use some kind of autoconf test, plus this:

                     #ifdef HAVE_CHAR_TRAITS
                    @@ -188,7 +188,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
                     #else
                     #define CPP_EOF EOF
                     #endif
                    -

                    No string::clear

                    +

                    No string::clear

                    There are two functions for deleting the contents of a string: clear and erase (the latter returns the string). @@ -206,25 +206,25 @@ erase(size_type __pos = 0, size_type __n = npos) Unfortunately, clear is not implemented in this version, so you should use erase (which is probably faster than operator=(charT*)). -

                    +

                    Removal of ostream::form and istream::scan extensions

                    These are no longer supported. Please use stringstreams instead. -

                    No basic_stringbuf, basic_stringstream

                    +

                    No basic_stringbuf, basic_stringstream

                    Although the ISO standard i/ostringstream-classes are provided, (sstream), for compatibility with older implementations the pre-ISO i/ostrstream (strstream) interface is also provided, with these caveats: -

                    • +

                      • strstream is considered to be deprecated -

                      • +

                      • strstream is limited to char -

                      • +

                      • with ostringstream you don't have to take care of terminating the string or freeing its memory -

                      • +

                      • istringstream can be re-filled (clear(); str(input);)

                      @@ -242,7 +242,7 @@ erase(size_type __pos = 0, size_type __n = npos) std::ostrstream oss; #endif -oss << “Name=” << m_name << “, number=” << m_number << std::endl; +oss << Name= << m_name << , number= << m_number << std::endl; ... #ifndef HAVE_SSTREAM oss << std::ends; // terminate the char*-string @@ -298,15 +298,15 @@ any = temp;

                      Another example of using stringstreams is in this howto.

                      There is additional information in the libstdc++-v2 info files, in -particular “info iostream”. -

                    Little or no wide character support

                    +particular info iostream. +

                    Little or no wide character support

                    Classes wstring and char_traits<wchar_t> are not supported. -

                    No templatized iostreams

                    +

                    No templatized iostreams

                    Classes wfilebuf and wstringstream are not supported. -

                    Thread safety issues

                    +

                    Thread safety issues

                    Earlier GCC releases had a somewhat different approach to threading configuration and proper compilation. Before GCC 3.0, configuration of the threading model was dictated by compiler @@ -342,11 +342,11 @@ particular “info iostream”. first relevant message in the thread; from there you can use "Thread Next" to move down the thread. This farm is in latest-to-oldest order. -

                    • +

                      • Our threading expert Loren gives a breakdown of the six situations involving threads for the 3.0 release series. -

                      • +

                      • This message inspired a recent updating of issues with threading and the SGI STL library. It also contains some @@ -357,14 +357,14 @@ particular “info iostream”. few people with access to the backup tapes have been too swamped with work to restore them. Many of the points have been superseded anyhow.) -

                    Third

                    The third generation GNU C++ library is called libstdc++, or +

                    Third

                    The third generation GNU C++ library is called libstdc++, or libstdc++-v3.

                    The subset commonly known as the Standard Template Library (chapters 23 through 25, mostly) is adapted from the final release of the SGI STL (version 3.3), with extensive changes.

                    A more formal description of the V3 goals can be found in the official design document. -

                    Portability notes and known implementation limitations are as follows.

                    Pre-ISO headers moved to backwards or removed

                    The pre-ISO C++ headers +

                    Portability notes and known implementation limitations are as follows.

                    Pre-ISO headers moved to backwards or removed

                    The pre-ISO C++ headers (iostream.h, defalloc.h etc.) are available, unlike previous libstdc++ versions, but inclusion generates a warning that you are using deprecated headers. @@ -436,7 +436,7 @@ like vector.h can be replaced with using namespace std; can be put at the global scope. This should be enough to get this code compiling, assuming the other usage is correct. -

                    Extension headers hash_map, hash_set moved to ext or backwards

                    At this time most of the features of the SGI STL extension have been +

                    Extension headers hash_map, hash_set moved to ext or backwards

                    At this time most of the features of the SGI STL extension have been replaced by standardized libraries. In particular, the unordered_map and unordered_set containers of TR1 are suitable replacement for the non-standard hash_map and hash_set @@ -508,18 +508,18 @@ AC_DEFUN([AC_HEADER_EXT_HASH_SET], [ AC_DEFINE(HAVE_EXT_HASH_SET,,[Define if ext/hash_set is present. ]) fi ]) -

                    No ios::nocreate/ios::noreplace. +

                    No ios::nocreate/ios::noreplace.

                    The existence of ios::nocreate being used for input-streams has been confirmed, most probably because the author thought it would be more correct to specify nocreate explicitly. So it can be left out for input-streams. -

                    For output streams, “nocreate” is probably the default, +

                    For output streams, nocreate is probably the default, unless you specify std::ios::trunc ? To be safe, you can open the file for reading, check if it has been opened, and then decide whether you want to create/replace or not. To my knowledge, even older implementations support app, ate and trunc (except for app ?). -

                    +

                    No stream::attach(int fd)

                    Phil Edwards writes: It was considered and rejected for the ISO @@ -542,7 +542,7 @@ No stream::attach(int fd) For another example of this, refer to fdstream example by Nicolai Josuttis. -

                    +

                    Support for C++98 dialect.

                    Check for complete library coverage of the C++1998/2003 standard.

                    @@ -610,7 +610,7 @@ AC_DEFUN([AC_HEADER_STDCXX_98], [
                         AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
                       fi
                     ])
                    -

                    +

                    Support for C++TR1 dialect.

                    Check for library coverage of the TR1 standard.

                    @@ -687,7 +687,7 @@ AC_DEFUN([AC_HEADER_TR1_UNORDERED_SET], [
                         AC_DEFINE(HAVE_TR1_UNORDERED_SET,,[Define if tr1/unordered_set is present. ])
                       fi
                     ])
                    -

                    +

                    Support for C++0x dialect.

                    Check for baseline language coverage in the compiler for the C++0xstandard.

                    @@ -899,27 +899,27 @@ AC_DEFUN([AC_HEADER_UNORDERED_SET], [
                         AC_DEFINE(HAVE_UNORDERED_SET,,[Define if unordered_set is present. ])
                       fi
                     ])
                    -

                    +

                    Container::iterator_type is not necessarily Container::value_type*

                    This is a change in behavior from the previous version. Now, most iterator_type typedefs in container classes are POD objects, not value_type pointers. -

                    Bibliography

                    [ +

                    Bibliography

                    [ kegel41 ] Migrating to GCC 4.1 . Dan Kegel. - .

                    [ + .

                    [ kegel41 ] Building the Whole Debian Archive with GCC 4.1: A Summary . Martin Michlmayr. - .

                    [ + .

                    [ lbl32 ] Migration guide for GCC-3.2 diff --git a/libstdc++-v3/doc/html/manual/bitmap_allocator.html b/libstdc++-v3/doc/html/manual/bitmap_allocator.html index 806ca047865..4a9f0405df7 100644 --- a/libstdc++-v3/doc/html/manual/bitmap_allocator.html +++ b/libstdc++-v3/doc/html/manual/bitmap_allocator.html @@ -1,7 +1,7 @@ -bitmap_allocator

                    bitmap_allocator

                    -

                    Design

                    +bitmap_allocator

                    bitmap_allocator

                    +

                    Design

                    As this name suggests, this allocator uses a bit-map to keep track of the used and unused memory locations for it's book-keeping purposes. @@ -27,7 +27,7 @@ Mutex Protection around every allocation/deallocation. The state of the macro is picked up automatically from the gthr abstraction layer. -

                    Implementation

                    Free List Store

                    +

                    Implementation

                    Free List Store

                    The Free List Store (referred to as FLS for the remaining part of this document) is the Global memory pool that is shared by all instances of the bitmapped allocator instantiated for any type. This maintains a @@ -65,17 +65,17 @@ this internal fragmentation has to be decided by this function. I can see 3 possibilities right now. Please add more as and when you find better strategies. -

                    1. Equal size check. Return true only when the 2 blocks are of equal -size.

                    2. Difference Threshold: Return true only when the _block_size is +

                      1. Equal size check. Return true only when the 2 blocks are of equal +size.

                      2. Difference Threshold: Return true only when the _block_size is greater than or equal to the _required_size, and if the _BS is > _RS by a difference of less than some THRESHOLD value, then return true, -else return false.

                      3. Percentage Threshold. Return true only when the _block_size is +else return false.

                      4. Percentage Threshold. Return true only when the _block_size is greater than or equal to the _required_size, and if the _BS is > _RS by a percentage of less than some THRESHOLD value, then return true, else return false.

                      Currently, (3) is being used with a value of 36% Maximum wastage per Super Block. -

                    Super Block

                    +

                    Super Block

                    A super block is the block of memory acquired from the FLS from which the bitmap allocator carves out memory for single objects and satisfies the user's requests. These super blocks come in @@ -90,7 +90,7 @@ else return false.

              The super block is contained in the FLS, and the FLS is responsible for getting / returning Super Bocks to and from the OS using operator new as defined by the C++ standard. -

            Super Block Data Layout

            +

            Super Block Data Layout

            Each Super Block will be of some size that is a multiple of the number of Bits Per Block. Typically, this value is chosen as Bits_Per_Byte x sizeof(size_t). On an x86 system, this gives the @@ -103,7 +103,7 @@ else return false.

          Consider a block of size 64 ints. In memory, it would look like this: (assume a 32-bit system where, size_t is a 32-bit entity). -

          Table 33.1. Bitmap Allocator Memory Map

          268042949672954294967295Data -> Space for 64 ints

          +

          Table 33.1. Bitmap Allocator Memory Map

          268042949672954294967295Data -> Space for 64 ints

          The first Column(268) represents the size of the Block in bytes as seen by the Bitmap Allocator. Internally, a global free list is used to keep track of the free blocks used and given back by the @@ -130,7 +130,7 @@ else return false.

        The 3rd 4x2 is size of the bitmap itself, which is the size of 32-bits x 2, which is 8-bytes, or 2 x sizeof(size_t). -

      Maximum Wasted Percentage

      +

      Maximum Wasted Percentage

      This has nothing to do with the algorithm per-se, only with some vales that must be chosen correctly to ensure that the allocator performs well in a real word scenario, and maintains a good @@ -155,29 +155,29 @@ For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524%

      Thus, knowing these values, and based on the sizeof(value_type), we may create a function that returns the Max_Wastage_Percentage for us to use. -

      allocate

      +

      allocate

      The allocate function is specialized for single object allocation ONLY. Thus, ONLY if n == 1, will the bitmap_allocator's specialized algorithm be used. Otherwise, the request is satisfied directly by calling operator new.

      Suppose n == 1, then the allocator does the following: -

      1. +

        1. Checks to see whether a free block exists somewhere in a region of memory close to the last satisfied request. If so, then that block is marked as allocated in the bit map and given to the user. If not, then (2) is executed. -

        2. +

        3. Is there a free block anywhere after the current block right up to the end of the memory that we have? If so, that block is found, and the same procedure is applied as above, and returned to the user. If not, then (3) is executed. -

        4. +

        5. Is there any block in whatever region of memory that we own free? This is done by checking -

          • +

            • The use count for each super block, and if that fails then -

            • +

            • The individual bit-maps for each super block.

            Note: Here we are never touching any of the memory that the @@ -186,21 +186,21 @@ For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524% misses. If this succeeds then we apply the same procedure on that bit-map as (1), and return that block of memory to the user. However, if this process fails, then we resort to (4). -

          • +

          • This process involves Refilling the internal exponentially growing memory pool. The said effect is achieved by calling _S_refill_pool which does the following: -

            • +

              • Gets more memory from the Global Free List of the Required size. -

              • +

              • Adjusts the size for the next call to itself. -

              • +

              • Writes the appropriate headers in the bit-maps. -

              • +

              • Sets the use count for that super-block just allocated to 0 (zero). -

              • +

              • All of the above accounts to maintaining the basic invariant for the allocator. If the invariant is maintained, we are sure that all is well. Now, the same process is applied on @@ -210,13 +210,13 @@ For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524% Thus, you can clearly see that the allocate function is nothing but a combination of the next-fit and first-fit algorithm optimized ONLY for single object allocations. -

              deallocate

              +

              deallocate

              The deallocate function again is specialized for single objects ONLY. For all n belonging to > 1, the operator delete is called without further ado, and the deallocate function returns.

              However for n == 1, a series of steps are performed: -

              1. +

                1. We first need to locate that super-block which holds the memory location given to us by the user. For that purpose, we maintain a static variable _S_last_dealloc_index, which holds the index @@ -227,7 +227,7 @@ single object allocations. the check for belongs_to succeeds, then we determine the bit-map for the given pointer, and locate the index into that bit-map, and mark that bit as free by setting it. -

                2. +

                3. If the _S_last_dealloc_index does not point to the memory block that we're looking for, then we do a linear search on the block stored in the vector of Block Pairs. This vector in code is @@ -241,7 +241,7 @@ single object allocations. the vector. While doing this, we also make sure that the basic invariant is maintained by making sure that _S_last_request and _S_last_dealloc_index point to valid locations within the vector. -

                Questions

                1

                +

                Questions

                1

                Q1) The "Data Layout" section is cryptic. I have no idea of what you are trying to say. Layout of what? The free-list? Each bitmap? The Super Block? @@ -251,7 +251,7 @@ size. In the example, a super block of size 32 x 1 is taken. The general formula for calculating the size of a super block is 32 x sizeof(value_type) x 2^n, where n ranges from 0 to 32 for 32-bit systems. -

                2

                +

                2

                And since I just mentioned the term `each bitmap', what in the world is meant by it? What does each bitmap manage? How does it relate to the super block? Is the Super @@ -268,7 +268,7 @@ Block a bitmap as well? blocks' status. Each bit-map is made up of a number of size_t, whose exact number for a super-block of a given size I have just mentioned. -

                3

                +

                3

                How do the allocate and deallocate functions work in regard to bitmaps?

                @@ -297,15 +297,15 @@ Block a bitmap as well?

                The bit-map now looks like this: 1111111111111111111111111111111111111111111111111111111111111110 -

                Locality

                +

                Locality

                Another issue would be whether to keep the all bitmaps in a separate area in memory, or to keep them near the actual blocks that will be given out or allocated for the client. After some testing, I've decided to keep these bitmaps close to the actual blocks. This will help in 2 ways. -

                1. Constant time access for the bitmap themselves, since no kind of +

                  1. Constant time access for the bitmap themselves, since no kind of look up will be needed to find the correct bitmap list or it's -equivalent.

                  2. And also this would preserve the cache as far as possible.

                  +equivalent.

                2. And also this would preserve the cache as far as possible.

                So in effect, this kind of an allocator might prove beneficial from a purely cache point of view. But this allocator has been made to try and roll out the defects of the node_allocator, wherein the nodes get @@ -314,7 +314,7 @@ equivalent.

              2. And also this would preserve the cache as far as poss new_allocator's book keeping overhead is too much for small objects and single object allocations, though it preserves the locality of blocks very well when they are returned back to the allocator. -

              Overhead and Grow Policy

              +

              Overhead and Grow Policy

              Expected overhead per block would be 1 bit in memory. Also, once the address of the free list has been found, the cost for allocation/deallocation would be negligible, and is supposed to be diff --git a/libstdc++-v3/doc/html/manual/bitset.html b/libstdc++-v3/doc/html/manual/bitset.html index acc150df7e8..9cff276218f 100644 --- a/libstdc++-v3/doc/html/manual/bitset.html +++ b/libstdc++-v3/doc/html/manual/bitset.html @@ -1,6 +1,6 @@ -bitset

              bitset

              Size Variable

              +bitset

              bitset

              Size Variable

              No, you cannot write code of the form

                     #include <bitset>
              @@ -18,7 +18,7 @@
                    There are a couple of ways to handle this kind of thing.  Please
                    consider all of them before passing judgement.  They include, in
                    no particular order:
              -   

              • A very large N in bitset<N>.

              • A container<bool>.

              • Extremely weird solutions.

              +

              • A very large N in bitset<N>.

              • A container<bool>.

              • Extremely weird solutions.

              A very large N in bitset<N>.   It has been pointed out a few times in newsgroups that N bits only takes up @@ -28,10 +28,10 @@ housekeeping info; it is known at compile time exactly how large the set is) will hold over four million bits. If you're using those bits as status flags (e.g., - “changed”/“unchanged” flags), that's a + changed/unchanged flags), that's a lot of state.

              - You can then keep track of the “maximum bit used” + You can then keep track of the maximum bit used during some testing runs on representative data, make note of how many of those bits really need to be there, and then reduce N to a smaller number. Leave some extra space, of course. (If you @@ -85,21 +85,21 @@

              Also note that the implementation of bitset used in libstdc++ has some extensions. -

              Type String

              +

              Type String

              Bitmasks do not take char* nor const char* arguments in their constructors. This is something of an accident, but you can read - about the problem: follow the library's “Links” from - the homepage, and from the C++ information “defect - reflector” link, select the library issues list. Issue + about the problem: follow the library's Links from + the homepage, and from the C++ information defect + reflector link, select the library issues list. Issue number 116 describes the problem.

              For now you can simply make a temporary string object using the constructor expression:

              -      std::bitset<5> b ( std::string(“10110”) );
              +      std::bitset<5> b ( std::string(10110) );
                  

              instead of

              -      std::bitset<5> b ( “10110” );    // invalid
              +      std::bitset<5> b ( 10110 );    // invalid
                   
              diff --git a/libstdc++-v3/doc/html/manual/bk01ix01.html b/libstdc++-v3/doc/html/manual/bk01ix01.html index 51a67bbe12d..576c0d4f7e3 100644 --- a/libstdc++-v3/doc/html/manual/bk01ix01.html +++ b/libstdc++-v3/doc/html/manual/bk01ix01.html @@ -1,6 +1,6 @@ -Index

              Index

              A

              Algorithms, +Index

              Index

              A

              Algorithms, Algorithms
              Appendix
              Contributing, @@ -42,7 +42,10 @@
              Support, Support -

              U

              Utilities, +

              U

              Utilities, Utilities
              diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html b/libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html index 9f1265610be..0ed5fa86fa4 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html @@ -1,6 +1,6 @@ -Numeric Properties

              Numeric Properties

              +Numeric Properties

              Numeric Properties

              The header limits defines traits classes to give access to various implementation defined-aspects of the fundamental types. The traits classes -- diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html b/libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html index 96825362179..c9225c8b9ca 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html @@ -1,6 +1,6 @@ -NULL

              NULL

              +NULL

              NULL

              The only change that might affect people is the type of NULL: while it is required to be a macro, the definition of that macro is not allowed @@ -12,7 +12,7 @@ g++.

              The biggest problem of #defining NULL to be - something like “0L” is that the compiler will view + something like 0L is that the compiler will view that as a long integer before it views it as a pointer, so overloading won't do what you expect. (This is why g++ has a magic extension, so that diff --git a/libstdc++-v3/doc/html/manual/bk01pt02pr01.html b/libstdc++-v3/doc/html/manual/bk01pt02pr01.html index 4ec01fefd93..80b42c631ec 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt02pr01.html +++ b/libstdc++-v3/doc/html/manual/bk01pt02pr01.html @@ -1,9 +1,9 @@ -

              This part deals with the functions called and objects created automatically during the course of a program's existence.

              diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html b/libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html index d72d23d2d95..54df29a6553 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html @@ -1,6 +1,6 @@ -Adding Data to Exceptions

              Adding Data to Exceptions

              +Adding Data to Exceptions

              Adding Data to Exceptions

              The standard exception classes carry with them a single string as data (usually describing what went wrong or where the 'throw' took place). It's good to remember that you can add your own data to diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch08.html b/libstdc++-v3/doc/html/manual/bk01pt03ch08.html index 5c6d0c83a24..b66b555a2da 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch08.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch08.html @@ -1,10 +1,10 @@ -Chapter 8. Concept Checking

              Chapter 8. Concept Checking

              + In 1999, SGI added concept checkers to their implementation of the STL: code which checked the template parameters of instantiated pieces of the STL, in order to insure that the parameters being used met the requirements of the diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13.html index 48fb471b929..e86d7fe1779 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt05ch13.html +++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13.html @@ -1,9 +1,9 @@ -Chapter 13. String Classes

              Chapter 13. String Classes

              Simple Transformations

              Here are Standard, simple, and portable ways to perform common transformations on a string instance, such as "convert to all upper case." The word transformations diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html index 454e01e881b..2cd970a12bf 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html @@ -1,13 +1,13 @@ -Case Sensitivity

              Case Sensitivity

              +Case Sensitivity

              Case Sensitivity

              The well-known-and-if-it-isn't-well-known-it-ought-to-be Guru of the Week discussions held on Usenet covered this topic in January of 1998. - Briefly, the challenge was, “write a 'ci_string' class which + Briefly, the challenge was, write a 'ci_string' class which is identical to the standard 'string' class, but is case-insensitive in the same way as the (common but nonstandard) - C function stricmp()”. + C function stricmp().

                  ci_string s( "AbCdE" );
               
              diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html
              index 5d694747a6f..aa2afea53a6 100644
              --- a/libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html
              +++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html
              @@ -1,6 +1,6 @@
               
               
              -Arbitrary Character Types

              Arbitrary Character Types

              +Arbitrary Character Types

              Arbitrary Character Types

              The std::basic_string is tantalizingly general, in that it is parameterized on the type of the characters which it holds. In theory, you could whip up a Unicode character class and instantiate diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html index 3334567e39d..12d1ee7fb5c 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html +++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html @@ -1,6 +1,6 @@ -Tokenizing

              Tokenizing

              +Tokenizing

              Tokenizing

              The Standard C (and C++) function strtok() leaves a lot to be desired in terms of user-friendliness. It's unintuitive, it destroys the character string on which it operates, and it requires diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html index fd2a77cb148..b6a5da10d20 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html +++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html @@ -1,6 +1,6 @@ -Shrink to Fit

              Shrink to Fit

              +Shrink to Fit

              Shrink to Fit

              From GCC 3.4 calling s.reserve(res) on a string s with res < s.capacity() will reduce the string's capacity to std::max(s.size(), res). @@ -10,7 +10,7 @@ std::string(str.data(), str.size()).swap(str);

              This is similar to the idiom for reducing a vector's memory usage - (see this FAQ + (see this FAQ entry) but the regular copy constructor cannot be used because libstdc++'s string is Copy-On-Write.

              diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html index c6fb477f7c9..29ad197e1dd 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html +++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html @@ -1,6 +1,6 @@ -CString (MFC)

              CString (MFC)

              +CString (MFC)

              CString (MFC)

              A common lament seen in various newsgroups deals with the Standard string class as opposed to the Microsoft Foundation Class called CString. Often programmers realize that a standard portable @@ -10,12 +10,12 @@

              Things are not as bad as they seem. In this message, Joe Buck points out a few very important things: -

              • The Standard string supports all the operations +

                • The Standard string supports all the operations that CString does, with three exceptions. -

                • Two of those exceptions (whitespace trimming and case +

                • Two of those exceptions (whitespace trimming and case conversion) are trivial to implement. In fact, we do so on this page. -

                • The third is CString::Format, which allows formatting +

                • The third is CString::Format, which allows formatting in the style of sprintf. This deserves some mention:

                The old libg++ library had a function called form(), which did much @@ -68,18 +68,18 @@ performance is O(n).

                Joe Buck also pointed out some other things to keep in mind when comparing CString and the Standard string class: -

                • CString permits access to its internal representation; coders +

                  • CString permits access to its internal representation; coders who exploited that may have problems moving to string. -

                  • Microsoft ships the source to CString (in the files +

                  • Microsoft ships the source to CString (in the files MFC\SRC\Str{core,ex}.cpp), so you could fix the allocation bug and rebuild your MFC libraries. Note: It looks like the CString shipped with VC++6.0 has fixed this, although it may in fact have been one of the VC++ SPs that did it. -

                  • string operations like this have O(n) complexity +

                  • string operations like this have O(n) complexity if the implementors do it correctly. The libstdc++ implementors did it correctly. Other vendors might not. -

                  • While parts of the SGI STL are used in libstdc++, their +

                  • While parts of the SGI STL are used in libstdc++, their string class is not. The SGI string is essentially vector<char> and does not do any reference counting like libstdc++'s does. (It is O(n), though.) diff --git a/libstdc++-v3/doc/html/manual/bk01pt08ch19.html b/libstdc++-v3/doc/html/manual/bk01pt08ch19.html index f5474946535..6b6bb02dbde 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt08ch19.html +++ b/libstdc++-v3/doc/html/manual/bk01pt08ch19.html @@ -1,11 +1,11 @@ -Chapter 19. Predefined

                    Chapter 19. Predefined

                    Iterators vs. Pointers

                    The following -FAQ entry points out that +FAQ entry points out that iterators are not implemented as pointers. They are a generalization of pointers, but they are implemented in libstdc++ as separate classes. diff --git a/libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html b/libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html index 8988b2316b8..2a0e28d40da 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html @@ -1,6 +1,6 @@ -One Past the End

                    One Past the End

                    This starts off sounding complicated, but is actually very easy, +One Past the End

                    One Past the End

                    This starts off sounding complicated, but is actually very easy, especially towards the end. Trust me.

                    Beginners usually have a little trouble understand the whole 'past-the-end' thing, until they remember their early algebra classes @@ -9,15 +9,15 @@

                    First, some history, and a reminder of some of the funkier rules in C and C++ for builtin arrays. The following rules have always been true for both languages: -

                    1. You can point anywhere in the array, or to the first element +

                      1. You can point anywhere in the array, or to the first element past the end of the array. A pointer that points to one past the end of the array is guaranteed to be as unique as a pointer to somewhere inside the array, so that you can compare such pointers safely. -

                      2. You can only dereference a pointer that points into an array. +

                      3. You can only dereference a pointer that points into an array. If your array pointer points outside the array -- even to just one past the end -- and you dereference it, Bad Things happen. -

                      4. Strictly speaking, simply pointing anywhere else invokes +

                      5. Strictly speaking, simply pointing anywhere else invokes undefined behavior. Most programs won't puke until such a pointer is actually dereferenced, but the standards leave that up to the platform. diff --git a/libstdc++-v3/doc/html/manual/bk01pt09ch20.html b/libstdc++-v3/doc/html/manual/bk01pt09ch20.html index a1055e56225..a343f9c50f4 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt09ch20.html +++ b/libstdc++-v3/doc/html/manual/bk01pt09ch20.html @@ -1,9 +1,9 @@ -Chapter 20. Mutating

                        Chapter 20. Mutating

                        Table of Contents

                        swap
                        Specializations

                        swap

                        Specializations

                        If you call std::swap(x,y); where x and y are standard containers, then the call will automatically be replaced by a call to x.swap(y); instead.

                        This allows member functions of each container class to take over, and diff --git a/libstdc++-v3/doc/html/manual/bk01pt09pr02.html b/libstdc++-v3/doc/html/manual/bk01pt09pr02.html index 420cb81b855..d03d0f22558 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt09pr02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt09pr02.html @@ -1,17 +1,17 @@ -

                        The neatest accomplishment of the algorithms chapter is that all the work is done via iterators, not containers directly. This means two important things: -

                        1. +

                          1. Anything that behaves like an iterator can be used in one of these algorithms. Raw pointers make great candidates, thus built-in arrays are fine containers, as well as your own iterators. -

                          2. +

                          3. The algorithms do not (and cannot) affect the container as a whole; only the things between the two iterator endpoints. If you pass a range of iterators only enclosing the middle third of diff --git a/libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html b/libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html index e77fa847b49..31c37c741cf 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html @@ -1,6 +1,6 @@ -C99

                            C99

                            In addition to the other topics on this page, we'll note here some +C99

                            C99

                            In addition to the other topics on this page, we'll note here some of the C99 features that appear in libstdc++.

                            The C99 features depend on the --enable-c99 configure flag. This flag is already on by default, but it can be disabled by the diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html b/libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html index 7fce554de21..b713ad2ef02 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html @@ -1,6 +1,6 @@ -Buffering

                            Buffering

                            First, are you sure that you understand buffering? Particularly +Buffering

                            Buffering

                            First, are you sure that you understand buffering? Particularly the fact that C++ may not, in fact, have anything to do with it?

                            The rules for buffering can be a little odd, but they aren't any different from those of C. (Maybe that's why they can be a bit diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html b/libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html index 45151c1e649..4366e8fd8c0 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html @@ -1,6 +1,6 @@ -Binary Input and Output

                            Binary Input and Output

                            +Binary Input and Output

                            Binary Input and Output

                            The first and most important thing to remember about binary I/O is that opening a file with ios::binary is not, repeat not, the only thing you have to do. It is not a silver @@ -38,26 +38,26 @@ of formatting functions and classes to perform something which requires that formatting not be done? There are a seemingly infinite number of solutions, and a few are listed here: -

                            • Derive your own fstream-type classes and write your own +

                              • Derive your own fstream-type classes and write your own <</>> operators to do binary I/O on whatever data - types you're using.” + types you're using.

                                This is a Bad Thing, because while the compiler would probably be just fine with it, other humans are going to be confused. The overloaded bitshift operators have a well-defined meaning (formatting), and this breaks it. -

                              • - “Build the file structure in memory, then +

                              • + Build the file structure in memory, then mmap() the file and copy the structure. - ” +

                                Well, this is easy to make work, and easy to break, and is pretty equivalent to using ::read() and ::write() directly, and makes no use of the iostream library at all... -

                              • - “Use streambufs, that's what they're there for.” +

                              • + Use streambufs, that's what they're there for.

                                While not trivial for the beginner, this is the best of all solutions. The streambuf/filebuf layer is the layer that is diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html b/libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html index 22fa0879445..69fa0f12ec1 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html @@ -1,6 +1,6 @@ -Performance

                                Performance

                                +Performance

                                Performance

                                Pathetic Performance? Ditch C.

                                It sounds like a flame on C, but it isn't. Really. Calm down. I'm just saying it to get your attention. diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html index 4a2ddb809e3..2605ad3b453 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html @@ -1,6 +1,6 @@ -Semantics

                                Semantics

                                +Semantics

                                Semantics

                                A program that uses the C++ standard library correctly will maintain the same semantics under debug mode as it had with the normal (release) library. All functional and exception-handling @@ -36,7 +36,7 @@ (N.B. In GCC 3.4.x and 4.0.0, due to a bug, -D_GLIBXX_DEBUG_PEDANTIC was also needed. The problem has been fixed in GCC 4.0.1 and later versions.)

                                The following library components provide extra debugging - capabilities in debug mode:

                                • std::basic_string (no safe iterators and see note below)

                                • std::bitset

                                • std::deque

                                • std::list

                                • std::map

                                • std::multimap

                                • std::multiset

                                • std::set

                                • std::vector

                                • std::unordered_map

                                • std::unordered_multimap

                                • std::unordered_set

                                • std::unordered_multiset

                                N.B. although there are precondition checks for some string operations, + capabilities in debug mode:

                                • std::basic_string (no safe iterators and see note below)

                                • std::bitset

                                • std::deque

                                • std::list

                                • std::map

                                • std::multimap

                                • std::multiset

                                • std::set

                                • std::vector

                                • std::unordered_map

                                • std::unordered_multimap

                                • std::unordered_set

                                • std::unordered_multiset

                                N.B. although there are precondition checks for some string operations, e.g. operator[], they will not always be run when using the char and wchar_t specialisations (std::string and diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html index 089058c2ff7..fe879cb7393 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html @@ -1,7 +1,7 @@ -Using

                                Using

                                -

                                Using the Debug Mode

                                To use the libstdc++ debug mode, compile your application with the +Using

                                Using

                                +

                                Using the Debug Mode

                                To use the libstdc++ debug mode, compile your application with the compiler flag -D_GLIBCXX_DEBUG. Note that this flag changes the sizes and behavior of standard class templates such as std::vector, and therefore you can only link code @@ -10,7 +10,7 @@ units.

                                By default, error messages are formatted to fit on lines of about 78 characters. The environment variable GLIBCXX_DEBUG_MESSAGE_LENGTH can be used to request a - different length.

                                Using a Specific Debug Container

                                When it is not feasible to recompile your entire application, or + different length.

                                Using a Specific Debug Container

                                When it is not feasible to recompile your entire application, or only specific containers need checking, debugging containers are available as GNU extensions. These debugging containers are functionally equivalent to the standard drop-in containers used in @@ -19,6 +19,6 @@ mode or with debug mode. The following table provides the names and headers of the debugging containers: -

                                Table 30.1. Debugging Containers

                                ContainerHeaderDebug containerDebug header
                                std::bitsetbitset__gnu_debug::bitsetbitset
                                std::dequedeque__gnu_debug::dequedeque
                                std::listlist__gnu_debug::listlist
                                std::mapmap__gnu_debug::mapmap
                                std::multimapmap__gnu_debug::multimapmap
                                std::multisetset__gnu_debug::multisetset
                                std::setset__gnu_debug::setset
                                std::stringstring__gnu_debug::stringstring
                                std::wstringstring__gnu_debug::wstringstring
                                std::basic_stringstring__gnu_debug::basic_stringstring
                                std::vectorvector__gnu_debug::vectorvector

                                In addition, when compiling in C++0x mode, these additional +

                                Table 30.1. Debugging Containers

                                ContainerHeaderDebug containerDebug header
                                std::bitsetbitset__gnu_debug::bitsetbitset
                                std::dequedeque__gnu_debug::dequedeque
                                std::listlist__gnu_debug::listlist
                                std::mapmap__gnu_debug::mapmap
                                std::multimapmap__gnu_debug::multimapmap
                                std::multisetset__gnu_debug::multisetset
                                std::setset__gnu_debug::setset
                                std::stringstring__gnu_debug::stringstring
                                std::wstringstring__gnu_debug::wstringstring
                                std::basic_stringstring__gnu_debug::basic_stringstring
                                std::vectorvector__gnu_debug::vectorvector

                                In addition, when compiling in C++0x mode, these additional containers have additional debug capability. -

                                Table 30.2. Debugging Containers C++0x

                                ContainerHeaderDebug containerDebug header
                                std::unordered_mapunordered_map__gnu_debug::unordered_mapunordered_map
                                std::unordered_multimapunordered_map__gnu_debug::unordered_multimapunordered_map
                                std::unordered_setunordered_set__gnu_debug::unordered_setunordered_set
                                std::unordered_multisetunordered_set__gnu_debug::unordered_multisetunordered_set

                                +

                                Table 30.2. Debugging Containers C++0x

                                ContainerHeaderDebug containerDebug header
                                std::unordered_mapunordered_map__gnu_debug::unordered_mapunordered_map
                                std::unordered_multimapunordered_map__gnu_debug::unordered_multimapunordered_map
                                std::unordered_setunordered_set__gnu_debug::unordered_setunordered_set
                                std::unordered_multisetunordered_set__gnu_debug::unordered_multisetunordered_set

                                diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html b/libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html index 32dc8d72c01..862789635a7 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html @@ -1,11 +1,11 @@ -Design

                                Design

                                -

                                Goals

                                +Design

                                Design

                                +

                                Goals

                                The libstdc++ debug mode replaces unsafe (but efficient) standard containers and iterators with semantically equivalent safe standard containers and iterators to aid in debugging user programs. The - following goals directed the design of the libstdc++ debug mode:

                                • Correctness: the libstdc++ debug mode must not change + following goals directed the design of the libstdc++ debug mode:

                                  • Correctness: the libstdc++ debug mode must not change the semantics of the standard library for all cases specified in the ANSI/ISO C++ standard. The essence of this constraint is that any valid C++ program should behave in the same manner regardless @@ -16,18 +16,18 @@ valid. A program that is not valid C++ (e.g., invokes undefined behavior) is not required to behave similarly, although the debug mode will abort with a diagnostic when it detects undefined - behavior.

                                  • Performance: the additional of the libstdc++ debug mode + behavior.

                                  • Performance: the additional of the libstdc++ debug mode must not affect the performance of the library when it is compiled in release mode. Performance of the libstdc++ debug mode is secondary (and, in fact, will be worse than the release - mode).

                                  • Usability: the libstdc++ debug mode should be easy to + mode).

                                  • Usability: the libstdc++ debug mode should be easy to use. It should be easily incorporated into the user's development environment (e.g., by requiring only a single new compiler switch) and should produce reasonable diagnostics when it detects a problem with the user program. Usability also involves detection of errors when using the debug mode incorrectly, e.g., by linking a release-compiled object against a debug-compiled object if in - fact the resulting program will not run correctly.

                                  • Minimize recompilation: While it is expected that + fact the resulting program will not run correctly.

                                  • Minimize recompilation: While it is expected that users recompile at least part of their program to use debug mode, the amount of recompilation affects the detect-compile-debug turnaround time. This indirectly affects the @@ -39,24 +39,24 @@ higher-numbered conformance levels are more usable (i.e., require less recompilation) but are more complicated to implement than the lower-numbered conformance levels. -

                                    1. Full recompilation: The user must recompile his or +

                                      1. Full recompilation: The user must recompile his or her entire application and all C++ libraries it depends on, including the C++ standard library that ships with the compiler. This must be done even if only a small part of the - program can use debugging features.

                                      2. Full user recompilation: The user must recompile + program can use debugging features.

                                      3. Full user recompilation: The user must recompile his or her entire application and all C++ libraries it depends on, but not the C++ standard library itself. This must be done even if only a small part of the program can use debugging features. This can be achieved given a full recompilation system by compiling two versions of the standard library when the compiler is installed and linking against the appropriate - one, e.g., a multilibs approach.

                                      4. Partial recompilation: The user must recompile the + one, e.g., a multilibs approach.

                                      5. Partial recompilation: The user must recompile the parts of his or her application and the C++ libraries it depends on that will use the debugging facilities directly. This means that any code that uses the debuggable standard containers would need to be recompiled, but code that does not use them (but may, for instance, use IOStreams) - would not have to be recompiled.

                                      6. Per-use recompilation: The user must recompile the + would not have to be recompiled.

                                      7. Per-use recompilation: The user must recompile the parts of his or her application and the C++ libraries it depends on where debugging should occur, and any other code that interacts with those containers. This means that a set of @@ -74,7 +74,7 @@ behavior is technically a violation of the One Definition Rule, this ability tends to be very important in practice. The libstdc++ debug mode supports this level of - recompilation.

                                      8. Per-unit recompilation: The user must only + recompilation.

                                      9. Per-unit recompilation: The user must only recompile the translation units where checking should occur, regardless of where debuggable standard containers are used. This has also been dubbed "-g mode", @@ -89,10 +89,10 @@ (performance regression) or allocating extra memory associated with each iterator with new (changes the program semantics).

                                      -

                                Methods

                                +

                            Methods

                            This section provides an overall view of the design of the libstdc++ debug mode and details the relationship between design - decisions and the stated design goals.

                            The Wrapper Model

                            The libstdc++ debug mode uses a wrapper model where the + decisions and the stated design goals.

                            The Wrapper Model

                            The libstdc++ debug mode uses a wrapper model where the debugging versions of library components (e.g., iterators and containers) form a layer on top of the release versions of the library components. The debugging components first verify that the @@ -109,19 +109,19 @@ their associated containers, which are necessary to detect certain types of standard library usage errors such as dereferencing past-the-end iterators or inserting into a container using an - iterator from a different container.

                            Safe Iterators

                            Iterator wrappers provide a debugging layer over any iterator that + iterator from a different container.

                            Safe Iterators

                            Iterator wrappers provide a debugging layer over any iterator that is attached to a particular container, and will manage the information detailing the iterator's state (singular, dereferenceable, etc.) and tracking the container to which the iterator is attached. Because iterators have a well-defined, common interface the iterator wrapper is implemented with the iterator adaptor class template __gnu_debug::_Safe_iterator, - which takes two template parameters:

                            • Iterator: The underlying iterator type, which must + which takes two template parameters:

                              • Iterator: The underlying iterator type, which must be either the iterator or const_iterator - typedef from the sequence type this iterator can reference.

                              • Sequence: The type of sequence that this iterator + typedef from the sequence type this iterator can reference.

                              • Sequence: The type of sequence that this iterator references. This sequence must be a safe sequence (discussed below) whose iterator or const_iterator typedef - is the type of the safe iterator.

                            Safe Sequences (Containers)

                            Container wrappers provide a debugging layer over a particular + is the type of the safe iterator.

                Safe Sequences (Containers)

                Container wrappers provide a debugging layer over a particular container type. Because containers vary greatly in the member functions they support and the semantics of those member functions (especially in the area of iterator invalidation), container @@ -157,7 +157,7 @@ template<typename _Tp, typename _Allocator = allocator<_Tp> // duplicate std::list interface with debugging semantics }; -

              Precondition Checking

              The debug mode operates primarily by checking the preconditions of +

              Precondition Checking

              The debug mode operates primarily by checking the preconditions of all standard library operations that it supports. Preconditions that are always checked (regardless of whether or not we are in debug mode) are checked via the __check_xxx macros defined @@ -184,7 +184,7 @@ template<typename _Tp, typename _Allocator = allocator<_Tp> cousin _GLIBCXX_DEBUG_PEDASSERT, or the assertion check macro that supports more advance formulation of error messages, _GLIBCXX_DEBUG_VERIFY. These macros are - documented more thoroughly in the debug mode source code.

              Release- and debug-mode coexistence

              The libstdc++ debug mode is the first debug mode we know of that + documented more thoroughly in the debug mode source code.

              Release- and debug-mode coexistence

              The libstdc++ debug mode is the first debug mode we know of that is able to provide the "Per-use recompilation" (4) guarantee, that allows release-compiled and debug-compiled code to be linked and executed together without causing unpredictable behavior. This @@ -200,7 +200,7 @@ template<typename _Tp, typename _Allocator = allocator<_Tp> recompilation but have had to give up some checking of the std::basic_string class template (namely, safe iterators). -

              Compile-time coexistence of release- and debug-mode components

              Both the release-mode components and the debug-mode +

              Compile-time coexistence of release- and debug-mode components

              Both the release-mode components and the debug-mode components need to exist within a single translation unit so that the debug versions can wrap the release versions. However, only one of these components should be user-visible at any particular @@ -254,7 +254,7 @@ namespace std // namespace __debug __attribute__ ((strong)); inline namespace __debug { } } -

              Link- and run-time coexistence of release- and +
              Link- and run-time coexistence of release- and debug-mode components

              Because each component has a distinct and separate release and debug implementation, there are are no issues with link-time coexistence: the separate namespaces result in different mangled @@ -301,11 +301,11 @@ test02() release-mode basic_string? While the answer could be "both", and the difference hidden via renaming a la the debug/release containers, we must note two things about locale - facets:

              1. They exist as shared state: one can create a facet in one + facets:

                1. They exist as shared state: one can create a facet in one translation unit and access the facet via the same type name in a different translation unit. This means that we cannot have two different versions of locale facets, because the types would not be - the same across debug/release-mode translation unit barriers.

                2. They have virtual functions returning strings: these functions + the same across debug/release-mode translation unit barriers.

                3. They have virtual functions returning strings: these functions mangle in the same way regardless of the mangling of their return types (see above), and their precise signatures can be relied upon by users because they may be overridden in derived classes.

                With the design of libstdc++ debug mode, we cannot effectively hide @@ -316,24 +316,24 @@ test02() changes. The effect on users is expected to be minimal, as there are simple alternatives (e.g., __gnu_debug::basic_string), and the usability benefit we gain from the ability to mix debug- and - release-compiled translation units is enormous.

              Alternatives for Coexistence

              The coexistence scheme above was chosen over many alternatives, + release-compiled translation units is enormous.

              Alternatives for Coexistence

              The coexistence scheme above was chosen over many alternatives, including language-only solutions and solutions that also required extensions to the C++ front end. The following is a partial list of - solutions, with justifications for our rejection of each.

              • Completely separate debug/release libraries: This is by + solutions, with justifications for our rejection of each.

                • Completely separate debug/release libraries: This is by far the simplest implementation option, where we do not allow any coexistence of debug- and release-compiled translation units in a program. This solution has an extreme negative affect on usability, because it is quite likely that some libraries an application depends on cannot be recompiled easily. This would not meet our usability or minimize recompilation criteria - well.

                • Add a Debug boolean template parameter: + well.

                • Add a Debug boolean template parameter: Partial specialization could be used to select the debug implementation when Debug == true, and the state of _GLIBCXX_DEBUG could decide whether the default Debug argument is true or false. This option would break conformance with the C++ standard in both debug and release modes. This would - not meet our correctness criteria.

                • Packaging a debug flag in the allocators: We could + not meet our correctness criteria.

                • Packaging a debug flag in the allocators: We could reuse the Allocator template parameter of containers by adding a sentinel wrapper debug<> that signals the user's intention to use debugging, and pick up @@ -344,18 +344,18 @@ test02() (and more importantly), users that specify allocators instead of implicitly using the default allocator would not get debugging containers. Thus this solution fails the correctness - criteria.

                • Define debug containers in another namespace, and employ + criteria.

                • Define debug containers in another namespace, and employ a using declaration (or directive): This is an enticing option, because it would eliminate the need for the link_name extension by aliasing the templates. However, there is no true template aliasing mechanism is C++, because both using directives and using declarations disallow specialization. This method fails - the correctness criteria.

                • Use implementation-specific properties of anonymous + the correctness criteria.

                • Use implementation-specific properties of anonymous namespaces. See this post - This method fails the correctness criteria.

                • Extension: allow reopening on namespaces: This would + This method fails the correctness criteria.

                • Extension: allow reopening on namespaces: This would allow the debug mode to effectively alias the namespace std to an internal namespace, such as __gnu_std_debug, so that it is completely @@ -366,7 +366,7 @@ test02() instance, the program would have two std::cout objects! This solution would fails the minimize recompilation requirement, because we would only be able to - support option (1) or (2).

                • Extension: use link name: This option involves + support option (1) or (2).

                • Extension: use link name: This option involves complicated re-naming between debug-mode and release-mode components at compile time, and then a g++ extension called link name to recover the original names at link time. There @@ -388,23 +388,23 @@ test02() that breaks user specialization), and additional testcases will be added as we are able to identify other typical problem cases. These test cases will serve as a benchmark by which we can compare debug - mode implementations.

              Other Implementations

              + mode implementations.

              Other Implementations

              There are several existing implementations of debug modes for C++ standard library implementations, although none of them directly supports debugging for programs using libstdc++. The existing - implementations include:

              • SafeSTL: + implementations include:

                • SafeSTL: SafeSTL was the original debugging version of the Standard Template Library (STL), implemented by Cay S. Horstmann on top of the Hewlett-Packard STL. Though it inspired much work in this area, it has not been kept up-to-date for use with modern compilers or C++ - standard library implementations.

                • STLport: STLport is a free + standard library implementations.

                • STLport: STLport is a free implementation of the C++ standard library derived from the SGI implementation, and ported to many other platforms. It includes a debug mode that uses a wrapper model (that in some ways inspired the libstdc++ debug mode design), although at the time of this writing the debug mode is somewhat incomplete and meets only the "Full user recompilation" (2) recompilation guarantee by requiring the user to link against a - different library in debug mode vs. release mode.

                • Metrowerks CodeWarrior: The C++ standard library + different library in debug mode vs. release mode.

                • Metrowerks CodeWarrior: The C++ standard library that ships with Metrowerks CodeWarrior includes a debug mode. It is a full debug-mode implementation (including debugging for CodeWarrior extensions) and is easy to use, although it meets only diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html index 9418c79cdfe..64acc0aa5c3 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html @@ -1,6 +1,6 @@ -Semantics

                  Semantics

                  The parallel mode STL algorithms are currently not exception-safe, +Semantics

                  Semantics

                  The parallel mode STL algorithms are currently not exception-safe, i.e. user-defined functors must not throw exceptions. Also, the order of execution is not guaranteed for some functions, of course. Therefore, user-defined functors should not have any concurrent side effects. diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html index 265a3116022..542d9bed0c9 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html @@ -1,6 +1,6 @@ -Using

                  Using

                  Prerequisite Compiler Flags

                  +Using

                  Using

                  Prerequisite Compiler Flags

                  Any use of parallel functionality requires additional compiler and runtime support, in particular support for OpenMP. Adding this support is not difficult: just compile your application with the compiler @@ -17,7 +17,7 @@ In addition, hardware that supports atomic operations and a compiler as -march=i686, -march=native or -mcpu=v9. See the GCC manual for more information. -

                  Using Parallel Mode

                  +

                  Using Parallel Mode

                  To use the libstdc++ parallel mode, compile your application with the prerequisite flags as detailed above, and in addition add -D_GLIBCXX_PARALLEL. This will convert all @@ -34,7 +34,7 @@ In addition, hardware that supports atomic operations and a compiler if no instantiation of a container is passed between the two translation units. Parallel mode functionality has distinct linkage, and cannot be confused with normal mode symbols. -

                  Using Specific Parallel Components

                  When it is not feasible to recompile your entire application, or +

                  Using Specific Parallel Components

                  When it is not feasible to recompile your entire application, or only specific algorithms need to be parallel-aware, individual parallel algorithms can be made available explicitly. These parallel algorithms are functionally equivalent to the standard @@ -63,4 +63,4 @@ Then compile this code with the prerequisite compiler flags flags for atomic operations.)

                  The following table provides the names and headers of all the parallel algorithms that can be used in a similar manner: -

                  Table 31.1. Parallel Algorithms

                  AlgorithmHeaderParallel algorithmParallel header
                  std::accumulatenumeric__gnu_parallel::accumulateparallel/numeric
                  std::adjacent_differencenumeric__gnu_parallel::adjacent_differenceparallel/numeric
                  std::inner_productnumeric__gnu_parallel::inner_productparallel/numeric
                  std::partial_sumnumeric__gnu_parallel::partial_sumparallel/numeric
                  std::adjacent_findalgorithm__gnu_parallel::adjacent_findparallel/algorithm
                  std::countalgorithm__gnu_parallel::countparallel/algorithm
                  std::count_ifalgorithm__gnu_parallel::count_ifparallel/algorithm
                  std::equalalgorithm__gnu_parallel::equalparallel/algorithm
                  std::findalgorithm__gnu_parallel::findparallel/algorithm
                  std::find_ifalgorithm__gnu_parallel::find_ifparallel/algorithm
                  std::find_first_ofalgorithm__gnu_parallel::find_first_ofparallel/algorithm
                  std::for_eachalgorithm__gnu_parallel::for_eachparallel/algorithm
                  std::generatealgorithm__gnu_parallel::generateparallel/algorithm
                  std::generate_nalgorithm__gnu_parallel::generate_nparallel/algorithm
                  std::lexicographical_comparealgorithm__gnu_parallel::lexicographical_compareparallel/algorithm
                  std::mismatchalgorithm__gnu_parallel::mismatchparallel/algorithm
                  std::searchalgorithm__gnu_parallel::searchparallel/algorithm
                  std::search_nalgorithm__gnu_parallel::search_nparallel/algorithm
                  std::transformalgorithm__gnu_parallel::transformparallel/algorithm
                  std::replacealgorithm__gnu_parallel::replaceparallel/algorithm
                  std::replace_ifalgorithm__gnu_parallel::replace_ifparallel/algorithm
                  std::max_elementalgorithm__gnu_parallel::max_elementparallel/algorithm
                  std::mergealgorithm__gnu_parallel::mergeparallel/algorithm
                  std::min_elementalgorithm__gnu_parallel::min_elementparallel/algorithm
                  std::nth_elementalgorithm__gnu_parallel::nth_elementparallel/algorithm
                  std::partial_sortalgorithm__gnu_parallel::partial_sortparallel/algorithm
                  std::partitionalgorithm__gnu_parallel::partitionparallel/algorithm
                  std::random_shufflealgorithm__gnu_parallel::random_shuffleparallel/algorithm
                  std::set_unionalgorithm__gnu_parallel::set_unionparallel/algorithm
                  std::set_intersectionalgorithm__gnu_parallel::set_intersectionparallel/algorithm
                  std::set_symmetric_differencealgorithm__gnu_parallel::set_symmetric_differenceparallel/algorithm
                  std::set_differencealgorithm__gnu_parallel::set_differenceparallel/algorithm
                  std::sortalgorithm__gnu_parallel::sortparallel/algorithm
                  std::stable_sortalgorithm__gnu_parallel::stable_sortparallel/algorithm
                  std::unique_copyalgorithm__gnu_parallel::unique_copyparallel/algorithm

                  +

                  Table 31.1. Parallel Algorithms

                  AlgorithmHeaderParallel algorithmParallel header
                  std::accumulatenumeric__gnu_parallel::accumulateparallel/numeric
                  std::adjacent_differencenumeric__gnu_parallel::adjacent_differenceparallel/numeric
                  std::inner_productnumeric__gnu_parallel::inner_productparallel/numeric
                  std::partial_sumnumeric__gnu_parallel::partial_sumparallel/numeric
                  std::adjacent_findalgorithm__gnu_parallel::adjacent_findparallel/algorithm
                  std::countalgorithm__gnu_parallel::countparallel/algorithm
                  std::count_ifalgorithm__gnu_parallel::count_ifparallel/algorithm
                  std::equalalgorithm__gnu_parallel::equalparallel/algorithm
                  std::findalgorithm__gnu_parallel::findparallel/algorithm
                  std::find_ifalgorithm__gnu_parallel::find_ifparallel/algorithm
                  std::find_first_ofalgorithm__gnu_parallel::find_first_ofparallel/algorithm
                  std::for_eachalgorithm__gnu_parallel::for_eachparallel/algorithm
                  std::generatealgorithm__gnu_parallel::generateparallel/algorithm
                  std::generate_nalgorithm__gnu_parallel::generate_nparallel/algorithm
                  std::lexicographical_comparealgorithm__gnu_parallel::lexicographical_compareparallel/algorithm
                  std::mismatchalgorithm__gnu_parallel::mismatchparallel/algorithm
                  std::searchalgorithm__gnu_parallel::searchparallel/algorithm
                  std::search_nalgorithm__gnu_parallel::search_nparallel/algorithm
                  std::transformalgorithm__gnu_parallel::transformparallel/algorithm
                  std::replacealgorithm__gnu_parallel::replaceparallel/algorithm
                  std::replace_ifalgorithm__gnu_parallel::replace_ifparallel/algorithm
                  std::max_elementalgorithm__gnu_parallel::max_elementparallel/algorithm
                  std::mergealgorithm__gnu_parallel::mergeparallel/algorithm
                  std::min_elementalgorithm__gnu_parallel::min_elementparallel/algorithm
                  std::nth_elementalgorithm__gnu_parallel::nth_elementparallel/algorithm
                  std::partial_sortalgorithm__gnu_parallel::partial_sortparallel/algorithm
                  std::partitionalgorithm__gnu_parallel::partitionparallel/algorithm
                  std::random_shufflealgorithm__gnu_parallel::random_shuffleparallel/algorithm
                  std::set_unionalgorithm__gnu_parallel::set_unionparallel/algorithm
                  std::set_intersectionalgorithm__gnu_parallel::set_intersectionparallel/algorithm
                  std::set_symmetric_differencealgorithm__gnu_parallel::set_symmetric_differenceparallel/algorithm
                  std::set_differencealgorithm__gnu_parallel::set_differenceparallel/algorithm
                  std::sortalgorithm__gnu_parallel::sortparallel/algorithm
                  std::stable_sortalgorithm__gnu_parallel::stable_sortparallel/algorithm
                  std::unique_copyalgorithm__gnu_parallel::unique_copyparallel/algorithm

                  diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html index 26ea42d8398..16178cbfca2 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html @@ -1,7 +1,7 @@ -Design

                  Design

                  -

                  Interface Basics

                  +Design

                  Design

                  +

                  Interface Basics

                  All parallel algorithms are intended to have signatures that are equivalent to the ISO C++ algorithms replaced. For instance, the std::adjacent_find function is declared as: @@ -36,13 +36,13 @@ function, if no parallel functions are deemed worthy), based on either compile-time or run-time conditions.

                  The available signature options are specific for the different algorithms/algorithm classes.

                  The general view of overloads for the parallel algorithms look like this: -

                  • ISO C++ signature

                  • ISO C++ signature + sequential_tag argument

                  • ISO C++ signature + algorithm-specific tag type +

                    • ISO C++ signature

                    • ISO C++ signature + sequential_tag argument

                    • ISO C++ signature + algorithm-specific tag type (several signatures)

                    Please note that the implementation may use additional functions (designated with the _switch suffix) to dispatch from the ISO C++ signature to the correct parallel version. Also, some of the algorithms do not have support for run-time conditions, so the last overload is therefore missing. -

                  Configuration and Tuning

                  Setting up the OpenMP Environment

                  +

                  Configuration and Tuning

                  Setting up the OpenMP Environment

                  Several aspects of the overall runtime environment can be manipulated by standard OpenMP function calls.

                  @@ -72,7 +72,7 @@ Other parts of the runtime environment able to be manipulated include nested parallelism (omp_set_nested), schedule kind (omp_set_schedule), and others. See the OpenMP documentation for more information. -

                  Compile Time Switches

                  +

                  Compile Time Switches

                  To force an algorithm to execute sequentially, even though parallelism is switched on in general via the macro _GLIBCXX_PARALLEL, add __gnu_parallel::sequential_tag() to the end @@ -126,7 +126,7 @@ several additional choices, namely __gnu_parallel::balanced_quicksort_tag. Multiway mergesort comes with the two splitting strategies for multi-way merging. The quicksort options cannot be used for stable_sort. -

                  Run Time Settings and Defaults

                  +

                  Run Time Settings and Defaults

                  The default parallelization strategy, the choice of specific algorithm strategy, the minimum threshold limits for individual parallel algorithms, and aspects of the underlying hardware can be specified as @@ -194,7 +194,7 @@ int main() return 0; } -

                  Implementation Namespaces

                  One namespace contain versions of code that are always +

                  Implementation Namespaces

                  One namespace contain versions of code that are always explicitly sequential: __gnu_serial.

                  Two namespaces contain the parallel mode: diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html index 18598fcb319..6a10f32eea9 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html @@ -1,6 +1,6 @@ -Testing

                  Testing

                  +Testing

                  Testing

                  Both the normal conformance and regression tests and the supplemental performance tests work.

                  diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html index 70f0eef3199..e3db40de94f 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html @@ -1,10 +1,10 @@ -Design

                  Design

                  -

                  Table 32.1. Code Location

                  Code LocationUse
                  libstdc++-v3/include/std/*Preprocessor code to redirect to profile extension headers.
                  libstdc++-v3/include/profile/*Profile extension public headers (map, vector, ...).
                  libstdc++-v3/include/profile/impl/*Profile extension internals. Implementation files are +Design

                  Design

                  +

                  Table 32.1. Code Location

                  Code LocationUse
                  libstdc++-v3/include/std/*Preprocessor code to redirect to profile extension headers.
                  libstdc++-v3/include/profile/*Profile extension public headers (map, vector, ...).
                  libstdc++-v3/include/profile/impl/*Profile extension internals. Implementation files are only included from impl/profiler.h, which is the only file included from the public headers.

                  -

                  Wrapper Model

                  +

                  Wrapper Model

                  In order to get our instrumented library version included instead of the release one, we use the same wrapper model as the debug mode. @@ -25,7 +25,7 @@ Currently, mixing the profile mode with debug and parallel extensions is not allowed. Mixing them at compile time will result in preprocessor errors. Mixing them at link time is undefined. -

                  Instrumentation

                  +

                  Instrumentation

                  Instead of instrumenting every public entry and exit point, we chose to add instrumentation on demand, as needed by individual diagnostics. @@ -44,7 +44,7 @@

                  All the instrumentation on/off compile time switches live in include/profile/profiler.h. -

                  Run Time Behavior

                  +

                  Run Time Behavior

                  For practical reasons, the instrumentation library processes the trace partially rather than dumping it to disk in raw form. Each event is processed when @@ -63,25 +63,25 @@ For details, see paper presented at CGO 2009. -

                  Analysis and Diagnostics

                  +

                  Analysis and Diagnostics

                  Final analysis takes place offline, and it is based entirely on the generated trace and debugging info in the application binary. See section Diagnostics for a list of analysis types that we plan to support.

                  The input to the analysis is a table indexed by profile type and call stack. The data type for each entry depends on the profile type. -

                  Cost Model

                  +

                  Cost Model

                  While it is likely that cost models become complex as we get into more sophisticated analysis, we will try to follow a simple set of rules at the beginning. -

                  • Relative benefit estimation: +

                    • Relative benefit estimation: The idea is to estimate or measure the cost of all operations in the original scenario versus the scenario we advise to switch to. For instance, when advising to change a vector to a list, an occurrence of the insert method will generally count as a benefit. Its magnitude depends on (1) the number of elements that get shifted and (2) whether it triggers a reallocation. -

                    • Synthetic measurements: +

                    • Synthetic measurements: We will measure the relative difference between similar operations on different containers. We plan to write a battery of small tests that compare the times of the executions of similar methods on different @@ -89,16 +89,16 @@ If this training phase is very quick, we may decide to perform it at library initialization time. The results can be cached on disk and reused across runs. -

                    • Timers: +

                    • Timers: We plan to use timers for operations of larger granularity, such as sort. For instance, we can switch between different sort methods on the fly and report the one that performs best for each call context. -

                    • Show stoppers: +

                    • Show stoppers: We may decide that the presence of an operation nullifies the advice. For instance, when considering switching from set to unordered_set, if we detect use of operator ++, we will simply not issue the advice, since this could signal that the use - care require a sorted container.

                  Reports

                  + care require a sorted container.

                  Reports

                  There are two types of reports. First, if we recognize a pattern for which we have a substitute that is likely to give better performance, we print the advice and estimated performance gain. The advice is usually associated @@ -110,7 +110,7 @@ the top 10 multimap locations which have the worst data locality in actual traversals. Although this does not offer a solution, it helps the user focus on the key problems and ignore the uninteresting ones. -

                  Testing

                  +

                  Testing

                  First, we want to make sure we preserve the behavior of the release mode. You can just type "make check-profile", which builds and runs the whole test suite in profile mode. diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s03.html index 36aaf9392da..f943e20f0e7 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch32s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s03.html @@ -1,6 +1,6 @@ -Extensions for Custom Containers

                  Extensions for Custom Containers

                  +Extensions for Custom Containers

                  Extensions for Custom Containers

                  Many large projects use their own data structures instead of the ones in the standard library. If these data structures are similar in functionality to the standard library, they can be instrumented with the same hooks diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s04.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s04.html index 4246904d4fe..70a142871d2 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch32s04.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s04.html @@ -1,6 +1,6 @@ -Empirical Cost Model

                  Empirical Cost Model

                  +Empirical Cost Model

                  Empirical Cost Model

                  Currently, the cost model uses formulas with predefined relative weights for alternative containers or container implementations. For instance, iterating through a vector is X times faster than iterating through a list. diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s05.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s05.html index 42fae0c1ed6..d64fd47518f 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch32s05.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s05.html @@ -1,6 +1,6 @@ -Implementation Issues

                  Implementation Issues

                  Stack Traces

                  +Implementation Issues

                  Implementation Issues

                  Stack Traces

                  Accurate stack traces are needed during profiling since we group events by call context and dynamic instance. Without accurate traces, diagnostics may be hard to interpret. For instance, when giving advice to the user @@ -11,24 +11,24 @@ _GLIBCXX_PROFILE_STACK_DEPTH can be set to 0 if you are willing to give up call context information, or to a small positive value to reduce run time overhead. -

                  Symbolization of Instruction Addresses

                  +

                  Symbolization of Instruction Addresses

                  The profiling and analysis phases use only instruction addresses. An external utility such as addr2line is needed to postprocess the result. We do not plan to add symbolization support in the profile extension. This would require access to symbol tables, debug information tables, external programs or libraries and other system dependent information. -

                  Concurrency

                  +

                  Concurrency

                  Our current model is simplistic, but precise. We cannot afford to approximate because some of our diagnostics require precise matching of operations to container instance and call context. During profiling, we keep a single information table per diagnostic. There is a single lock per information table. -

                  Using the Standard Library in the Instrumentation Implementation

                  +

                  Using the Standard Library in the Instrumentation Implementation

                  As much as we would like to avoid uses of stdlibc++ within our instrumentation library, containers such as unordered_map are very appealing. We plan to use them as long as they are named properly to avoid ambiguity. -

                  Malloc Hooks

                  +

                  Malloc Hooks

                  User applications/libraries can provide malloc hooks. When the implementation of the malloc hooks uses stdlibc++, there can be an infinite cycle between the profile mode instrumentation and the @@ -42,7 +42,7 @@ uses non-recursive locks. XXX: A definitive solution to this problem would be for the profile extension to use a custom allocator internally, and perhaps not to use libstdc++. -

                  Construction and Destruction of Global Objects

                  +

                  Construction and Destruction of Global Objects

                  The profiling library state is initialized at the first call to a profiling method. This allows us to record the construction of all global objects. However, we cannot do the same at destruction time. The trace is written diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s06.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s06.html index 475b2d4fffc..ec752d398de 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch32s06.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s06.html @@ -1,6 +1,6 @@ -Developer Information

                  Developer Information

                  Big Picture

                  The profile mode headers are included with +Developer Information

                  Developer Information

                  Big Picture

                  The profile mode headers are included with -D_GLIBCXX_PROFILE through preprocessor directives in include/std/*.

                  Instrumented implementations are provided in @@ -14,7 +14,7 @@ must ensure (1) that the call is guarded against reentrance and (2) that the call can be turned off at compile time using a -D_GLIBCXX_PROFILE_... compiler option. -

                  How To Add A Diagnostic

                  Let's say the diagnostic name is "magic". +

                  How To Add A Diagnostic

                  Let's say the diagnostic name is "magic".

                  If you need to instrument a header not already under include/profile/*, first edit the corresponding header under include/std/ and add a preprocessor directive such @@ -36,15 +36,15 @@ Hook names must start with __profcxx_. Make sure they transform in no code with -D_NO_GLBICXX_PROFILE_MAGIC. - Make sure all calls to any method in namespace __cxxprof_impl + Make sure all calls to any method in namespace __gnu_profile is protected against reentrance using macro - _GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD. - All names of methods in namespace __cxxprof_impl called from + _GLIBCXX_PROFILE_REENTRANCE_GUARD. + All names of methods in namespace __gnu_profile called from profiler.h must start with __trace_magic_.

                  Add the implementation of the diagnostic. -

                  • +

                    • Create new file include/profile/impl/profiler_magic.h. -

                    • +

                    • Define class __magic_info: public __object_info_base. This is the representation of a line in the object table. The __merge method is used to aggregate information @@ -53,10 +53,10 @@ as a number of small operations, e.g., number of words copied. The __write method is used to produce the raw trace. The __advice method is used to produce the advice string. -

                    • +

                    • Define class __magic_stack_info: public __magic_info. This defines the content of a line in the stack table. -

                    • +

                    • Define class __trace_magic: public __trace_base<__magic_info, __magic_stack_info>. It defines the content of the trace associated with this diagnostic. diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html index cbe09f0f19d..b1f835d39b8 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html @@ -1,6 +1,6 @@ -Diagnostics

                      Diagnostics

                      +Diagnostics

                      Diagnostics

                      The table below presents all the diagnostics we intend to implement. Each diagnostic has a corresponding compile time switch -D_GLIBCXX_PROFILE_<diagnostic>. @@ -18,7 +18,7 @@ A high accuracy means that the diagnostic is unlikely to be wrong. These grades are not perfect. They are just meant to guide users with specific needs or time budgets. -

                      Table 32.2. Diagnostics

                      GroupFlagBenefitCostFreq.Implemented
                      +

                      Table 32.2. Diagnostics


                      Diagnostic Template

                      • Switch: + FALSE_SHARING

                      810 10no

                      Diagnostic Template

                      • Switch: _GLIBCXX_PROFILE_<diagnostic>. -

                      • Goal: What problem will it diagnose? -

                      • Fundamentals:. - What is the fundamental reason why this is a problem

                      • Sample runtime reduction: +

                      • Goal: What problem will it diagnose? +

                      • Fundamentals:. + What is the fundamental reason why this is a problem

                      • Sample runtime reduction: Percentage reduction in execution time. When reduction is more than a constant factor, describe the reduction rate formula. -

                      • Recommendation: - What would the advise look like?

                      • To instrument: - What stdlibc++ components need to be instrumented?

                      • Analysis: - How do we decide when to issue the advice?

                      • Cost model: - How do we measure benefits? Math goes here.

                      • Example: +

                      • Recommendation: + What would the advise look like?

                      • To instrument: + What stdlibc++ components need to be instrumented?

                      • Analysis: + How do we decide when to issue the advice?

                      • Cost model: + How do we measure benefits? Math goes here.

                      • Example:

                         program code
                         ...
                         advice sample
                         

                        -

                      Containers

                      +

                  Containers

                  Switch: _GLIBCXX_PROFILE_CONTAINERS. -

                  Hashtable Too Small

                  • Switch: +

                    Hashtable Too Small

                    • Switch: _GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL. -

                    • Goal: Detect hashtables with many +

                    • Goal: Detect hashtables with many rehash operations, small construction size and large destruction size. -

                    • Fundamentals: Rehash is very expensive. +

                    • Fundamentals: Rehash is very expensive. Read content, follow chains within bucket, evaluate hash function, place at - new location in different order.

                    • Sample runtime reduction: 36%. + new location in different order.

                    • Sample runtime reduction: 36%. Code similar to example below. -

                    • Recommendation: +

                    • Recommendation: Set initial size to N at construction site S. -

                    • To instrument: +

                    • To instrument: unordered_set, unordered_map constructor, destructor, rehash. -

                    • Analysis: +

                    • Analysis: For each dynamic instance of unordered_[multi]set|map, record initial size and call context of the constructor. Record size increase, if any, after each relevant operation such as insert. - Record the estimated rehash cost.

                    • Cost model: - Number of individual rehash operations * cost per rehash.

                    • Example: + Record the estimated rehash cost.

                    • Cost model: + Number of individual rehash operations * cost per rehash.

                    • Example:

                       1 unordered_set<int> us;
                       2 for (int k = 0; k < 1000000; ++k) {
                      @@ -81,24 +81,24 @@ advice sample
                       
                       foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1025530 rehash operations.
                       

                      -

                    Hashtable Too Large

                    • Switch: +

                    Hashtable Too Large

                    • Switch: _GLIBCXX_PROFILE_HASHTABLE_TOO_LARGE. -

                    • Goal: Detect hashtables which are +

                    • Goal: Detect hashtables which are never filled up because fewer elements than reserved are ever inserted. -

                    • Fundamentals: Save memory, which +

                    • Fundamentals: Save memory, which is good in itself and may also improve memory reference performance through - fewer cache and TLB misses.

                    • Sample runtime reduction: unknown. -

                    • Recommendation: + fewer cache and TLB misses.

                    • Sample runtime reduction: unknown. +

                    • Recommendation: Set initial size to N at construction site S. -

                    • To instrument: +

                    • To instrument: unordered_set, unordered_map constructor, destructor, rehash. -

                    • Analysis: +

                    • Analysis: For each dynamic instance of unordered_[multi]set|map, record initial size and call context of the constructor, and correlate it with its size at destruction time. -

                    • Cost model: - Number of iteration operations + memory saved.

                    • Example: +

                    • Cost model: + Number of iteration operations + memory saved.

                    • Example:

                       1 vector<unordered_set<int>> v(100000, unordered_set<int>(100)) ;
                       2 for (int k = 0; k < 100000; ++k) {
                      @@ -110,25 +110,25 @@ foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1
                       foo.cc:1: advice: Changing initial unordered_set size from 100 to 10 saves N
                       bytes of memory and M iteration steps.
                       

                      -

                    Inefficient Hash

                    • Switch: +

                    Inefficient Hash

                    • Switch: _GLIBCXX_PROFILE_INEFFICIENT_HASH. -

                    • Goal: Detect hashtables with polarized +

                    • Goal: Detect hashtables with polarized distribution. -

                    • Fundamentals: A non-uniform +

                    • Fundamentals: A non-uniform distribution may lead to long chains, thus possibly increasing complexity by a factor up to the number of elements. -

                    • Sample runtime reduction: factor up +

                    • Sample runtime reduction: factor up to container size. -

                    • Recommendation: Change hash function +

                    • Recommendation: Change hash function for container built at site S. Distribution score = N. Access score = S. Longest chain = C, in bucket B. -

                    • To instrument: +

                    • To instrument: unordered_set, unordered_map constructor, destructor, [], insert, iterator. -

                    • Analysis: +

                    • Analysis: Count the exact number of link traversals. -

                    • Cost model: - Total number of links traversed.

                    • Example: +

                    • Cost model: + Total number of links traversed.

                    • Example:

                       class dumb_hash {
                        public:
                      @@ -141,22 +141,22 @@ class dumb_hash {
                           hs.find(i);
                         }
                       

                      -

                    Vector Too Small

                    • Switch: +

                    Vector Too Small

                    • Switch: _GLIBCXX_PROFILE_VECTOR_TOO_SMALL. -

                    • Goal:Detect vectors with many +

                    • Goal:Detect vectors with many resize operations, small construction size and large destruction size.. -

                    • Fundamentals:Resizing can be expensive. +

                    • Fundamentals:Resizing can be expensive. Copying large amounts of data takes time. Resizing many small vectors may - have allocation overhead and affect locality.

                    • Sample runtime reduction:%. -

                    • Recommendation: - Set initial size to N at construction site S.

                    • To instrument:vector. -

                    • Analysis: + have allocation overhead and affect locality.

                    • Sample runtime reduction:%. +

                    • Recommendation: + Set initial size to N at construction site S.

                    • To instrument:vector. +

                    • Analysis: For each dynamic instance of vector, record initial size and call context of the constructor. Record size increase, if any, after each relevant operation such as push_back. Record the estimated resize cost. -

                    • Cost model: - Total number of words copied * time to copy a word.

                    • Example: +

                    • Cost model: + Total number of words copied * time to copy a word.

                    • Example:

                       1 vector<int> v;
                       2 for (int k = 0; k < 1000000; ++k) {
                      @@ -166,21 +166,21 @@ class dumb_hash {
                       foo.cc:1: advice: Changing initial vector size from 10 to 1000000 saves 
                       copying 4000000 bytes and 20 memory allocations and deallocations.
                       

                      -

                    Vector Too Large

                    • Switch: +

                    Vector Too Large

                    • Switch: _GLIBCXX_PROFILE_VECTOR_TOO_LARGE -

                    • Goal:Detect vectors which are +

                    • Goal:Detect vectors which are never filled up because fewer elements than reserved are ever inserted. -

                    • Fundamentals:Save memory, which +

                    • Fundamentals:Save memory, which is good in itself and may also improve memory reference performance through - fewer cache and TLB misses.

                    • Sample runtime reduction:%. -

                    • Recommendation: - Set initial size to N at construction site S.

                    • To instrument:vector. -

                    • Analysis: + fewer cache and TLB misses.

                    • Sample runtime reduction:%. +

                    • Recommendation: + Set initial size to N at construction site S.

                    • To instrument:vector. +

                    • Analysis: For each dynamic instance of vector, record initial size and call context of the constructor, and correlate it - with its size at destruction time.

                    • Cost model: - Total amount of memory saved.

                    • Example: + with its size at destruction time.

                    • Cost model: + Total amount of memory saved.

                    • Example:

                       1 vector<vector<int>> v(100000, vector<int>(100)) ;
                       2 for (int k = 0; k < 100000; ++k) {
                      @@ -192,27 +192,27 @@ copying 4000000 bytes and 20 memory allocations and deallocations.
                       foo.cc:1: advice: Changing initial vector size from 100 to 10 saves N
                       bytes of memory and may reduce the number of cache and TLB misses.
                       

                      -

                    Vector to Hashtable

                    • Switch: +

                    Vector to Hashtable

                    • Switch: _GLIBCXX_PROFILE_VECTOR_TO_HASHTABLE. -

                    • Goal: Detect uses of +

                    • Goal: Detect uses of vector that can be substituted with unordered_set to reduce execution time. -

                    • Fundamentals: +

                    • Fundamentals: Linear search in a vector is very expensive, whereas searching in a hashtable - is very quick.

                    • Sample runtime reduction:factor up + is very quick.

                    • Sample runtime reduction:factor up to container size. -

                    • Recommendation:Replace +

                    • Recommendation:Replace vector with unordered_set at site S. -

                    • To instrument:vector - operations and access methods.

                    • Analysis: +

                    • To instrument:vector + operations and access methods.

                    • Analysis: For each dynamic instance of vector, record call context of the constructor. Issue the advice only if the only methods called on this vector are push_back, insert and find. -

                    • Cost model: +

                    • Cost model: Cost(vector::push_back) + cost(vector::insert) + cost(find, vector) - cost(unordered_set::insert) + cost(unordered_set::find). -

                    • Example: +

                    • Example:

                       1  vector<int> v;
                       ...
                      @@ -223,24 +223,24 @@ bytes of memory and may reduce the number of cache and TLB misses.
                       foo.cc:1: advice: Changing "vector" to "unordered_set" will save about 500,000
                       comparisons.
                       

                      -

                    Hashtable to Vector

                    • Switch: +

                    Hashtable to Vector

                    • Switch: _GLIBCXX_PROFILE_HASHTABLE_TO_VECTOR. -

                    • Goal: Detect uses of +

                    • Goal: Detect uses of unordered_set that can be substituted with vector to reduce execution time. -

                    • Fundamentals: - Hashtable iterator is slower than vector iterator.

                    • Sample runtime reduction:95%. -

                    • Recommendation:Replace +

                    • Fundamentals: + Hashtable iterator is slower than vector iterator.

                    • Sample runtime reduction:95%. +

                    • Recommendation:Replace unordered_set with vector at site S. -

                    • To instrument:unordered_set - operations and access methods.

                    • Analysis: +

                    • To instrument:unordered_set + operations and access methods.

                    • Analysis: For each dynamic instance of unordered_set, record call context of the constructor. Issue the advice only if the number of find, insert and [] operations on this unordered_set are small relative to the number of elements, and methods begin or end - are invoked (suggesting iteration).

                    • Cost model: - Number of .

                    • Example: + are invoked (suggesting iteration).

                    • Cost model: + Number of .

                    • Example:

                       1  unordered_set<int> us;
                       ...
                      @@ -252,27 +252,27 @@ comparisons.
                       foo.cc:1: advice: Changing "unordered_set" to "vector" will save about N
                       indirections and may achieve better data locality.
                       

                      -

                    Vector to List

                    • Switch: +

                    Vector to List

                    • Switch: _GLIBCXX_PROFILE_VECTOR_TO_LIST. -

                    • Goal: Detect cases where +

                    • Goal: Detect cases where vector could be substituted with list for better performance. -

                    • Fundamentals: +

                    • Fundamentals: Inserting in the middle of a vector is expensive compared to inserting in a list. -

                    • Sample runtime reduction:factor up to +

                    • Sample runtime reduction:factor up to container size. -

                    • Recommendation:Replace vector with list - at site S.

                    • To instrument:vector - operations and access methods.

                    • Analysis: +

                    • Recommendation:Replace vector with list + at site S.

                    • To instrument:vector + operations and access methods.

                    • Analysis: For each dynamic instance of vector, record the call context of the constructor. Record the overhead of each insert operation based on current size and insert position. Report instance with high insertion overhead. -

                    • Cost model: +

                    • Cost model: (Sum(cost(vector::method)) - Sum(cost(list::method)), for method in [push_back, insert, erase]) - + (Cost(iterate vector) - Cost(iterate list))

                    • Example: + + (Cost(iterate vector) - Cost(iterate list))

                    • Example:

                       1  vector<int> v;
                       2  for (int i = 0; i < 10000; ++i) {
                      @@ -282,22 +282,22 @@ indirections and may achieve better data locality.
                       foo.cc:1: advice: Changing "vector" to "list" will save about 5,000,000 
                       operations.
                       

                      -

                    List to Vector

                    • Switch: +

                    List to Vector

                    • Switch: _GLIBCXX_PROFILE_LIST_TO_VECTOR. -

                    • Goal: Detect cases where +

                    • Goal: Detect cases where list could be substituted with vector for better performance. -

                    • Fundamentals: +

                    • Fundamentals: Iterating through a vector is faster than through a list. -

                    • Sample runtime reduction:64%. -

                    • Recommendation:Replace list with vector - at site S.

                    • To instrument:vector - operations and access methods.

                    • Analysis: +

                    • Sample runtime reduction:64%. +

                    • Recommendation:Replace list with vector + at site S.

                    • To instrument:vector + operations and access methods.

                    • Analysis: Issue the advice if there are no insert operations. -

                    • Cost model: +

                    • Cost model: (Sum(cost(vector::method)) - Sum(cost(list::method)), for method in [push_back, insert, erase]) - + (Cost(iterate vector) - Cost(iterate list))

                    • Example: + + (Cost(iterate vector) - Cost(iterate list))

                    • Example:

                       1  list<int> l;
                       ...
                      @@ -309,23 +309,23 @@ operations.
                       foo.cc:1: advice: Changing "list" to "vector" will save about 1000000 indirect
                       memory references.
                       

                      -

                    Ordered to Unordered Associative Container

                    • Switch: +

                    Ordered to Unordered Associative Container

                    • Switch: _GLIBCXX_PROFILE_ORDERED_TO_UNORDERED. -

                    • Goal: Detect cases where ordered +

                    • Goal: Detect cases where ordered associative containers can be replaced with unordered ones. -

                    • Fundamentals: +

                    • Fundamentals: Insert and search are quicker in a hashtable than in - a red-black tree.

                    • Sample runtime reduction:52%. -

                    • Recommendation: - Replace set with unordered_set at site S.

                    • To instrument: + a red-black tree.

                    • Sample runtime reduction:52%. +

                    • Recommendation: + Replace set with unordered_set at site S.

                    • To instrument: set, multiset, map, - multimap methods.

                    • Analysis: + multimap methods.

                    • Analysis: Issue the advice only if we are not using operator ++ on any iterator on a particular [multi]set|map. -

                    • Cost model: +

                    • Cost model: (Sum(cost(hashtable::method)) - Sum(cost(rbtree::method)), for method in [insert, erase, find]) - + (Cost(iterate hashtable) - Cost(iterate rbtree))

                    • Example: + + (Cost(iterate hashtable) - Cost(iterate rbtree))

                    • Example:

                       1  set<int> s;
                       2  for (int i = 0; i < 100000; ++i) {
                      @@ -336,43 +336,43 @@ memory references.
                       7    sum += *s.find(i);
                       8  }
                       

                      -

                  Algorithms

                  Switch: +

                  Algorithms

                  Switch: _GLIBCXX_PROFILE_ALGORITHMS. -

                  Sort Algorithm Performance

                  • Switch: +

                    Sort Algorithm Performance

                    • Switch: _GLIBCXX_PROFILE_SORT. -

                    • Goal: Give measure of sort algorithm +

                    • Goal: Give measure of sort algorithm performance based on actual input. For instance, advise Radix Sort over Quick Sort for a particular call context. -

                    • Fundamentals: +

                    • Fundamentals: See papers: A framework for adaptive algorithm selection in STAPL and Optimizing Sorting with Machine Learning Algorithms. -

                    • Sample runtime reduction:60%. -

                    • Recommendation: Change sort algorithm - at site S from X Sort to Y Sort.

                    • To instrument: sort - algorithm.

                    • Analysis: +

                    • Sample runtime reduction:60%. +

                    • Recommendation: Change sort algorithm + at site S from X Sort to Y Sort.

                    • To instrument: sort + algorithm.

                    • Analysis: Issue the advice if the cost model tells us that another sort algorithm would do better on this input. Requires us to know what algorithm we - are using in our sort implementation in release mode.

                    • Cost model: - Runtime(algo) for algo in [radix, quick, merge, ...]

                    • Example: + are using in our sort implementation in release mode.

                    • Cost model: + Runtime(algo) for algo in [radix, quick, merge, ...]

                    • Example:

                       

                      -

                  Data Locality

                  Switch: +

                  Data Locality

                  Switch: _GLIBCXX_PROFILE_LOCALITY. -

                  Need Software Prefetch

                  • Switch: +

                    Need Software Prefetch

                    • Switch: _GLIBCXX_PROFILE_SOFTWARE_PREFETCH. -

                    • Goal: Discover sequences of indirect +

                    • Goal: Discover sequences of indirect memory accesses that are not regular, thus cannot be predicted by hardware prefetchers. -

                    • Fundamentals: +

                    • Fundamentals: Indirect references are hard to predict and are very expensive when they - miss in caches.

                    • Sample runtime reduction:25%. -

                    • Recommendation: Insert prefetch - instruction.

                    • To instrument: Vector iterator and + miss in caches.

                    • Sample runtime reduction:25%. +

                    • Recommendation: Insert prefetch + instruction.

                    • To instrument: Vector iterator and access operator []. -

                    • Analysis: +

                    • Analysis: First, get cache line size and page size from system. Then record iterator dereference sequences for which the value is a pointer. For each sequence within a container, issue a warning if successive pointer @@ -389,9 +389,9 @@ memory references. created by understanding the capability of the hardware prefetcher. This model could be trained automatically by running a set of synthetic cases. -

                    • Cost model: +

                    • Cost model: Total distance between pointer values of successive elements in vectors - of pointers.

                    • Example: + of pointers.

                    • Example:

                       1 int zero = 0;
                       2 vector<int*> v(10000000, &zero);
                      @@ -404,28 +404,28 @@ memory references.
                       
                       foo.cc:7: advice: Insert prefetch instruction.
                       

                      -

                    Linked Structure Locality

                    • Switch: +

                    Linked Structure Locality

                    • Switch: _GLIBCXX_PROFILE_RBTREE_LOCALITY. -

                    • Goal: Give measure of locality of +

                    • Goal: Give measure of locality of objects stored in linked structures (lists, red-black trees and hashtables) with respect to their actual traversal patterns. -

                    • Fundamentals:Allocation can be tuned +

                    • Fundamentals:Allocation can be tuned to a specific traversal pattern, to result in better data locality. See paper: Custom Memory Allocation for Free. -

                    • Sample runtime reduction:30%. -

                    • Recommendation: +

                    • Sample runtime reduction:30%. +

                    • Recommendation: High scatter score N for container built at site S. Consider changing allocation sequence or choosing a structure conscious - allocator.

                    • To instrument: Methods of all - containers using linked structures.

                    • Analysis: + allocator.

                    • To instrument: Methods of all + containers using linked structures.

                    • Analysis: First, get cache line size and page size from system. Then record the number of successive elements that are on different line or page, for each traversal method such as find. Give advice only if the ratio between this number and the number of total node hops - is above a threshold.

                    • Cost model: - Sum(same_cache_line(this,previous))

                    • Example: + is above a threshold.

                    • Cost model: + Sum(same_cache_line(this,previous))

                    • Example:

                        1  set<int> s;
                        2  for (int i = 0; i < 10000000; ++i) {
                      @@ -449,58 +449,58 @@ foo.cc:7: advice: Insert prefetch instruction.
                       foo.cc:5: advice: High scatter score NNN for set built here.  Consider changing
                       the allocation sequence or switching to a structure conscious allocator.
                       

                      -

                  Multithreaded Data Access

                  +

                  Multithreaded Data Access

                  The diagnostics in this group are not meant to be implemented short term. They require compiler support to know when container elements are written to. Instrumentation can only tell us when elements are referenced.

                  Switch: _GLIBCXX_PROFILE_MULTITHREADED. -

                  Data Dependence Violations at Container Level

                  • Switch: +

                    Data Dependence Violations at Container Level

                    • Switch: _GLIBCXX_PROFILE_DDTEST. -

                    • Goal: Detect container elements +

                    • Goal: Detect container elements that are referenced from multiple threads in the parallel region or across parallel regions. -

                    • Fundamentals: +

                    • Fundamentals: Sharing data between threads requires communication and perhaps locking, which may be expensive. -

                    • Sample runtime reduction:?%. -

                    • Recommendation: Change data - distribution or parallel algorithm.

                    • To instrument: Container access methods +

                    • Sample runtime reduction:?%. +

                    • Recommendation: Change data + distribution or parallel algorithm.

                    • To instrument: Container access methods and iterators. -

                    • Analysis: +

                    • Analysis: Keep a shadow for each container. Record iterator dereferences and container member accesses. Issue advice for elements referenced by multiple threads. See paper: The LRPD test: speculative run-time parallelization of loops with privatization and reduction parallelization. -

                    • Cost model: +

                    • Cost model: Number of accesses to elements referenced from multiple threads -

                    • Example: +

                    • Example:

                       

                      -

                    False Sharing

                    • Switch: +

                    False Sharing

                    • Switch: _GLIBCXX_PROFILE_FALSE_SHARING. -

                    • Goal: Detect elements in the +

                    • Goal: Detect elements in the same container which share a cache line, are written by at least one thread, and accessed by different threads. -

                    • Fundamentals: Under these assumptions, +

                    • Fundamentals: Under these assumptions, cache protocols require communication to invalidate lines, which may be expensive. -

                    • Sample runtime reduction:68%. -

                    • Recommendation: Reorganize container - or use padding to avoid false sharing.

                    • To instrument: Container access methods +

                    • Sample runtime reduction:68%. +

                    • Recommendation: Reorganize container + or use padding to avoid false sharing.

                    • To instrument: Container access methods and iterators. -

                    • Analysis: +

                    • Analysis: First, get the cache line size. For each shared container, record all the associated iterator dereferences and member access methods with the thread id. Compare the address lists across threads to detect references in two different threads to the same cache line. Issue a warning only if the ratio to total references is significant. Do the same for iterator dereference values if they are - pointers.

                    • Cost model: + pointers.

                    • Cost model: Number of accesses to same cache line from different threads. -

                    • Example: +

                    • Example:

                       1     vector<int> v(2, 0);
                       2 #pragma omp parallel for shared(v, SIZE) schedule(static, 1)
                      @@ -512,7 +512,7 @@ OMP_NUM_THREADS=2 ./a.out
                       foo.cc:1: advice: Change container structure or padding to avoid false 
                       sharing in multithreaded access at foo.cc:4.  Detected N shared cache lines.
                       

                      -

                  Statistics

                  +

                  Statistics

                  Switch: _GLIBCXX_PROFILE_STATISTICS.

                  diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch34s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch34s02.html index e1588498eb9..70e4d924cec 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch34s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch34s02.html @@ -1,6 +1,6 @@ -HP/SGI

                  HP/SGI

                  +HP/SGI

                  HP/SGI

                  A few extensions and nods to backwards-compatibility have been made with containers. Those dealing with older SGI-style allocators are dealt with elsewhere. The remaining ones all deal with bits: diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch34s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch34s03.html index 3e3b28d9998..b9f0849bf5a 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch34s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch34s03.html @@ -1,6 +1,6 @@ -Deprecated HP/SGI

                  Deprecated HP/SGI

                  +Deprecated HP/SGI

                  Deprecated HP/SGI

                  The SGI hashing classes hash_set and hash_set have been deprecated by the unordered_set, unordered_multiset, unordered_map, @@ -37,7 +37,7 @@ functions, as well as some extra constructors specifying the number of buckets, etc.

                  Why would you want to use a hashing class instead of the - “normal”implementations? Matt Austern writes: + normalimplementations? Matt Austern writes:

                  [W]ith a well chosen hash function, hash tables generally provide much better average-case performance than diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch41s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch41s02.html index cd976c38f26..7d839e152ee 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch41s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch41s02.html @@ -1,6 +1,6 @@ -Implementation

                  Implementation

                  Using Builtin Atomic Functions

                  The functions for atomic operations described above are either +Implementation

                  Implementation

                  Using Builtin Atomic Functions

                  The functions for atomic operations described above are either implemented via compiler intrinsics (if the underlying host is capable) or by library fallbacks.

                  Compiler intrinsics (builtins) are always preferred. However, as the compiler builtins for atomics are not universally implemented, @@ -18,14 +18,14 @@ If builtins are possible for bool-sized integral types, If builtins are possible for int-sized integral types, _GLIBCXX_ATOMIC_BUILTINS_4 will be defined.

                  For the following hosts, intrinsics are enabled by default. -

                  • alpha

                  • ia64

                  • powerpc

                  • s390

                  For others, some form of -march may work. On +

                  • alpha

                  • ia64

                  • powerpc

                  • s390

                  For others, some form of -march may work. On non-ancient x86 hardware, -march=native usually does the trick.

                  For hosts without compiler intrinsics, but with capable hardware, hand-crafted assembly is selected. This is the case for the following hosts: -

                  • cris

                  • hppa

                  • i386

                  • i486

                  • m48k

                  • mips

                  • sparc

                  And for the rest, a simulated atomic lock via pthreads. +

                  • cris

                  • hppa

                  • i386

                  • i486

                  • m48k

                  • mips

                  • sparc

                  And for the rest, a simulated atomic lock via pthreads.

                  Detailed information about compiler intrinsics for atomic operations can be found in the GCC documentation.

                  More details on the library fallbacks from the porting section. -

                  Thread Abstraction

                  A thin layer above IEEE 1003.1 (i.e. pthreads) is used to abstract +

                  Thread Abstraction

                  A thin layer above IEEE 1003.1 (i.e. pthreads) is used to abstract the thread interface for GCC. This layer is called "gthread," and is comprised of one header file that wraps the host's default thread layer with a POSIX-like interface. diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch41s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch41s03.html index cba67ced6b4..deb28ca2ca4 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch41s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch41s03.html @@ -1,6 +1,6 @@ -Use

                  Use

                  Typical usage of the last two constructs is demonstrated as follows: +Use

                  Use

                  Typical usage of the last two constructs is demonstrated as follows:

                   #include <ext/concurrence.h>
                   
                  diff --git a/libstdc++-v3/doc/html/manual/bk01pt12pr03.html b/libstdc++-v3/doc/html/manual/bk01pt12pr03.html
                  index 68f3a89765d..a68ddced46d 100644
                  --- a/libstdc++-v3/doc/html/manual/bk01pt12pr03.html
                  +++ b/libstdc++-v3/doc/html/manual/bk01pt12pr03.html
                  @@ -1,15 +1,15 @@
                   
                   
                  -

                  Here we will make an attempt at describing the non-Standard extensions to the library. Some of these are from SGI's STL, some of these are GNU's, and some just seemed to appear on the doorstep.

                  Before you leap in and use any of these extensions, be aware of two things: -

                  1. +

                    1. Non-Standard means exactly that.

                      The behavior, and the very @@ -18,7 +18,7 @@ extensions, be aware of two things: revision of C++.) Also, other platforms, other compilers, other versions of g++ or libstdc++ may not recognize these names, or treat them differently, or... -

                    2. +

                    3. You should know how to access these headers properly.