From 39ec52254eda7cc2fab94aa7a5bb2fd1f395296b Mon Sep 17 00:00:00 2001 From: Phil Edwards Date: Thu, 24 Apr 2003 20:39:50 +0000 Subject: [PATCH] howto.html: Update some links. 2003-04-24 Phil Edwards * docs/html/17_intro/howto.html: Update some links. * docs/html/18_support/howto.html: Link doxygen numeric_limits notes. * docs/html/27_io/howto.html: Link doxygen stdio_filebuf notes. * docs/html/ext/howto.html: Link to demangler notes and API. * docs/html/faq/index.html: Remove trailing whitespace. (1.4, 2.4, 3.8, 4.1): Bring up to date. (5.6): Change to a bulleted list. * docs/html/faq/index.txt, docs/html/documentation.html, docs/html/17_intro/porting.html: Regenerate. From-SVN: r66050 --- libstdc++-v3/ChangeLog | 13 + libstdc++-v3/docs/html/17_intro/howto.html | 5 +- libstdc++-v3/docs/html/17_intro/porting.html | 39 ++- libstdc++-v3/docs/html/18_support/howto.html | 4 +- libstdc++-v3/docs/html/27_io/howto.html | 5 +- libstdc++-v3/docs/html/documentation.html | 1 + libstdc++-v3/docs/html/ext/howto.html | 1 + libstdc++-v3/docs/html/faq/index.html | 192 ++++++-------- libstdc++-v3/docs/html/faq/index.txt | 263 +++++++++---------- 9 files changed, 259 insertions(+), 264 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e3cd6ef3f4e7..170e188da2b4 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,16 @@ +2003-04-24 Phil Edwards + + * docs/html/17_intro/howto.html: Update some links. + * docs/html/18_support/howto.html: Link doxygen numeric_limits notes. + * docs/html/27_io/howto.html: Link doxygen stdio_filebuf notes. + * docs/html/ext/howto.html: Link to demangler notes and API. + * docs/html/faq/index.html: Remove trailing whitespace. + (1.4, 2.4, 3.8, 4.1): Bring up to date. + (5.6): Change to a bulleted list. + + * docs/html/faq/index.txt, docs/html/documentation.html, + docs/html/17_intro/porting.html: Regenerate. + 2003-04-23 Paolo Carlini * testsuite/27_io/basic_filebuf/3.cc: _S_pback_size now diff --git a/libstdc++-v3/docs/html/17_intro/howto.html b/libstdc++-v3/docs/html/17_intro/howto.html index 9d9bbddb1302..fc43d0f5892c 100644 --- a/libstdc++-v3/docs/html/17_intro/howto.html +++ b/libstdc++-v3/docs/html/17_intro/howto.html @@ -163,7 +163,7 @@

For those of you new to ISO C++98, no, that isn't a typo, the headers really have new names. Marshall Cline's C++ FAQ Lite has a good explanation in -item [26.4]. +item [27.4].

Return to top of page or to the FAQ. @@ -219,7 +219,8 @@ runtime demangler function. (The classes in <stdexcept> have constructors which require an argument to use later for what() calls, so the - question does not arise in most user-defined exceptions.) + problem of what()'s value does not arise in most + user-defined exceptions.)

[18.5.1]/7 The return value of std::type_info::name() is the mangled type name (see the diff --git a/libstdc++-v3/docs/html/17_intro/porting.html b/libstdc++-v3/docs/html/17_intro/porting.html index 3660ce8fef4a..ac51f4506734 100644 --- a/libstdc++-v3/docs/html/17_intro/porting.html +++ b/libstdc++-v3/docs/html/17_intro/porting.html @@ -134,12 +134,49 @@ need to define. You will need to add them to the target. It will not work to simply define these macros in os_defines.h. -

At this time, there is one libstdc++-v3-specific macro which may be +

At this time, there are a few libstdc++-v3-specific macro which may be defined. _G_USING_THUNKS may be defined to 0 to express that the port doesn't use thunks (although it is unclear that this is still useful since libio support isn't currently working and the g++ v3 ABI invalidates the assumption that some ports don't use thunks). +

_GLIBCPP_USE_C99_CHECK may be defined to 1 to check C99 +function declarations (which are not covered by specialization below) +found in system headers against versions found in the library headers +derived from the standard. + +

_GLIBCPP_USE_C99_DYNAMIC may be defined to an expression that +yields 0 if and only if the system headers are exposing proper support +for C99 functions (which are not covered by specialization below). If +defined, it must be 0 while bootstrapping the compiler/rebuilding the +library. + +

_GLIBCPP_USE_C99_LONG_LONG_CHECK may be defined to 1 to check +the set of C99 long long function declarations found in system headers +against versions found in the library headers derived from the +standard. + +

_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC may be defined to an +expression that yields 0 if and only if the system headers are +exposing proper support for the set of C99 long long functions. If +defined, it must be 0 while bootstrapping the compiler/rebuilding the +library. + +

_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC may be defined to an +expression that yields 0 if and only if the system headers +are exposing proper support for the related set of macros. If defined, +it must be 0 while bootstrapping the compiler/rebuilding the library. + +

_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_CHECK may be defined +to 1 to check the related set of function declarations found in system +headers against versions found in the library headers derived from +the standard. + +

_GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC may be defined +to an expression that yields 0 if and only if the system headers +are exposing proper support for the related set of functions. If defined, +it must be 0 while bootstrapping the compiler/rebuilding the library. +

Finally, you should bracket the entire file in an include-guard, like this: diff --git a/libstdc++-v3/docs/html/18_support/howto.html b/libstdc++-v3/docs/html/18_support/howto.html index c95f956a370a..df7305cc0338 100644 --- a/libstdc++-v3/docs/html/18_support/howto.html +++ b/libstdc++-v3/docs/html/18_support/howto.html @@ -117,7 +117,9 @@

This header mainly defines traits classes to give access to various implementation defined-aspects of the fundamental types. The traits classes -- fourteen in total -- are all specilizations of the - template class numeric_limits defined as follows: + template class numeric_limits, documented + here + and defined as follows:

    template<typename T> struct class {
diff --git a/libstdc++-v3/docs/html/27_io/howto.html b/libstdc++-v3/docs/html/27_io/howto.html
index 5cf4f4f05ef4..4a0b6a927fbc 100644
--- a/libstdc++-v3/docs/html/27_io/howto.html
+++ b/libstdc++-v3/docs/html/27_io/howto.html
@@ -741,8 +741,9 @@
      
  • Beginning with 3.1, the extra filebuf constructor and the fd() function were removed from the standard filebuf. Instead, <ext/stdio_filebuf.h> contains - a derived class called __gnu_cxx::stdio_filebuf. This - class can be constructed from a C FILE* or a file + a derived class called + __gnu_cxx::stdio_filebuf. + This class can be constructed from a C FILE* or a file descriptor, and provides the fd() function.
  • diff --git a/libstdc++-v3/docs/html/documentation.html b/libstdc++-v3/docs/html/documentation.html index c2fa332522d2..a0d2929760c5 100644 --- a/libstdc++-v3/docs/html/documentation.html +++ b/libstdc++-v3/docs/html/documentation.html @@ -224,6 +224,7 @@
  • Allocators (version 3.3)
  • Compile-time checks
  • LWG Issues
  • +
  • Demangling
  • diff --git a/libstdc++-v3/docs/html/ext/howto.html b/libstdc++-v3/docs/html/ext/howto.html index d2fc51ca3a8e..0f5dd1110c30 100644 --- a/libstdc++-v3/docs/html/ext/howto.html +++ b/libstdc++-v3/docs/html/ext/howto.html @@ -45,6 +45,7 @@
  • Allocators (version 3.3)
  • Compile-time checks
  • LWG Issues
  • +
  • Demangling

  • diff --git a/libstdc++-v3/docs/html/faq/index.html b/libstdc++-v3/docs/html/faq/index.html index 2a5c4d449b02..d952c9d47f5e 100644 --- a/libstdc++-v3/docs/html/faq/index.html +++ b/libstdc++-v3/docs/html/faq/index.html @@ -10,9 +10,9 @@ libstdc++-v3 FAQ - @@ -55,7 +55,7 @@
    1. How do I install libstdc++-v3?
    2. [removed]
    3. -
    4. What is this CVS thing that you keep +
    5. What is this CVS thing that you keep mentioning?
    6. How do I know if it works?
    7. This library is HUGE! And what's libsupc++?
    8. @@ -127,8 +127,8 @@

      1.1 What is libstdc++-v3?

      The GNU Standard C++ Library v3 is an - ongoing project to implement the ISO 14882 Standard C++ library - as described in chapters 17 through 27 and annex D. As the + ongoing project to implement the ISO 14882 Standard C++ library + as described in chapters 17 through 27 and annex D. As the library reaches stable plateaus, it is captured in a snapshot and released. The latest release is the @@ -137,7 +137,7 @@ far the project has come, or just want the latest bleeding-edge code, the up-to-date source is available over anonymous CVS, and can even be browsed over the Web (see - 1.4 below). + 1.4 below).

      The older libstdc++-v2 project is no longer maintained; the code has been completely replaced and rewritten. @@ -145,7 +145,7 @@ report bugs to your system vendor, not to the V3 list.

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


      @@ -156,11 +156,11 @@ implementations are (as the Draft Standard used to say) "incomplet and incorrekt," and many suffer from limitations of the compilers that use them. -

      +

      The GNU C/C++/FORTRAN/<pick-a-language> compiler (gcc, g++, etc) is widely considered to be one of the leading compilers in the world. Its development - has recently been taken over by the + has recently been taken over by the GCC team. All of the rapid development and near-legendary portability @@ -178,8 +178,8 @@

      1.3 Who's in charge of it?

      The libstdc++ project is contributed to by several developers all over the world, in the same way as GCC or Linux. - Benjamin Kosnik, Gabriel Dos Reis, Phil Edwards, Ulrich Drepper, - Loren James Rittle, and Paolo Carlini are the lead maintainers of + Benjamin Kosnik, Gabriel Dos Reis, Phil Edwards, Ulrich Drepper, + Loren James Rittle, and Paolo Carlini are the lead maintainers of the CVS archive.

      Development and discussion is held on the libstdc++ mailing @@ -191,23 +191,22 @@


      1.4 How do I get libstdc++?

      -

      The fourteenth (and latest) snapshot of libstdc++-v3 is - available - via ftp. -

      The homepage has instructions for retrieving the latest CVS sources, and for browsing the CVS sources over the web.

      +

      Stable versions of libstdc++-v3 are included with releases of + the GCC compilers. +

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

      +


      1.5 When is libstdc++ going to be finished?

      -

      Nathan Myers gave the best of all possible answers, responding to a @@ -224,7 +223,7 @@ which is no longer available, thanks deja...--> source code; anybody who is willing to help write documentation, for example, or has found a bug in code that we all thought was working, is more than welcome! -

      +


      1.7 What happened to libg++? I need that!

      @@ -254,7 +253,6 @@ which is no longer available, thanks deja...--> from libg++ might be extracted into an updated utilities library, but nobody has stated such a project yet.

      -

      (The Boost site houses free C++ libraries that do varying things, and happened to be started by members of the Standards Committee. Certain "useful @@ -317,7 +315,7 @@ which is no longer available, thanks deja...--> browse those files over CVSweb ahead of time to get a feel for what's required. RELEASE-NOTES is located in the ".../docs/17_intro/" directory of the distribution. -

      +


      2.2 [removed]

      @@ -332,9 +330,9 @@ which is no longer available, thanks deja...--> control packages. It was selected for GNU projects because it's free (speech), free (beer), and very high quality. The CVS entry in - the GNU software catalogue has a better description as + the GNU software catalogue has a better description as well as a - link to the makers of CVS. + link to the makers of CVS.

      The "anonymous client checkout" feature of CVS is similar to anonymous FTP in that it allows anyone to retrieve @@ -349,7 +347,9 @@ which is no longer available, thanks deja...-->

      2.4 How do I know if it works?

      libstdc++-v3 comes with its own testsuite. You do not need to actually install the library ("make - install") to run the testsuite. + install") to run the testsuite, but you do need + DejaGNU, as described + here.

      To run the testsuite on the library after building it, use "make check" while in your build directory. To run @@ -362,7 +362,7 @@ which is no longer available, thanks deja...-->


      -

      2.4 This library is HUGE! And what's libsupc++?

      +

      2.5 This library is HUGE! And what's libsupc++?

      Usually the size of libraries on disk isn't noticeable. When a link editor (or simply "linker") pulls things from a static archive library, only the necessary object files are copied @@ -431,7 +431,7 @@ which is no longer available, thanks deja...--> should, in theory, be usable under any ISO-compliant compiler. It will still be targeted and optimized for GCC/g++, however. -

      +


      3.2 [removed]

      @@ -510,17 +510,17 @@ which is no longer available, thanks deja...--> only available on the i486 and later. So if you configured GCC to target, for example, i386-linux, but actually used the programs on an i686, then you would encounter no problems. Only when - actually running the code on a i386 will the problem appear. + actually running the code on a i386 will the problem appear.

      This is fixed in 3.2.2.


      3.8 Recent GNU/Linux glibc required?

      -

      For 3.2.1 (shared library version 5.0.1) and later, the library - uses localization and formatting code from the system C library - (glibc) version 2.2.5. That version of glibc is over a year old - and contains necessary bugfixes. Many GNU/Linux distros make +

      When running on GNU/Linux, libstdc++ 3.2.1 (shared library version + 5.0.1) and later uses localization and formatting code from the system + C library (glibc) version 2.2.5. That version of glibc is over a + year old and contains necessary bugfixes. Many GNU/Linux distros make glibc version 2.3.x available now.

      The guideline is simple: the more recent the C++ library, the @@ -546,9 +546,9 @@ which is no longer available, thanks deja...-->


      4.0 Known Bugs and Non-Bugs

      Note that this section can get rapdily outdated -- such is the - nature of an open-source project. For the latest information, join - the mailing list or look through recent archives. The RELEASE- - NOTES and BUGS files are generally kept up-to-date. + nature of an open-source project. For the latest information, join + the mailing list or look through recent archives. The RELEASE- + NOTES and BUGS files are generally kept up-to-date.

      For 3.0.1, the most common "bug" is an apparently missing "../" in include/Makefile, resulting in files @@ -579,59 +579,22 @@ which is no longer available, thanks deja...-->

      4.1 What works already?

      -

      This is a verbatim clip from the "Status" section +

      Short answer: Pretty much everything works except for some + corner cases. Also, localization is incomplete. For whether it works + well, or as you expect it to work, see 5.2. +

      +

      Long answer: See the docs/html/17_intro/CHECKLIST file, which is + badly outdated... +

      +

      What follows is a verbatim clip from the "Status" section of the RELEASE-NOTES for the latest snapshot. For a list of fixed bugs, see that file. -

      +

       New:
      ----
      -(post 3.0.97)
      -- more doxygen documentation
      -- more named locale fixups
      -- stdio_filebuf that takes fd, FILE
      -- io performance tuning
      -- allocation tuning, valgrind fixups
      -- __cxa_demangle now supported
      -(3.0.97)
      -- more doxygen documentation.
      -- more named locale bug fixes
      -- support for symbol versioning when using GNU ld >= 2.12
      -- wide-io
      -- tuning for executable size
      -(3.0.96)
      -- more doxygen documentation.
      -- extensions moved out of namespace std
      -- HPUX long long support
      -- more string optimizations
      -- support for NetBSD cross compiles
      -- concept_check merge from boost
      -- header simplification
      -- named locale bug shakeout
      -- thread testsuite
      -(3.0.95)
      -- add S390, m68k, x86-64 support.
      -- doxygen documentation has been extended, including man pages.
      -- verbose terminate handling has been added.
      -- some libsupc++ tweaks
      -- warnings for deprecated headers now active.
      -- dejagnu testsuite preliminary documentation.
      -- dejagnu testsuite default.
      -- dejagnu testsuite cross compiler, multilib safe.
      -- long long iostreams on by default, rework of ISO C99 support.
      -- iterator re-write and testsuites.
      -- container testsuites.
      -- allocator revamp and testsuites.
      -- more concept-checking work.
      -- basic_string optimization and MT fixes.
      -- new limits implementation.
      -- update -fno-exceptions code, verify it works.
      -- full named locale support fpr all facets, choice of gnu,
      -  ieee_1003.1-200x (POSIX 2), or generic models. Full support depends
      -  on target OS and underlying "C" library support.
       
      @@ -713,8 +676,8 @@ New: reason is that the state flags are not cleared on a successful call to open(). The standard unfortunately did not specify behavior in this case, and to everybody's great sorrow, - the proposed LWG resolution (see - DR #22) is to leave the flags unchanged. You must insert a call + the proposed LWG resolution in + DR #22 is to leave the flags unchanged. You must insert a call to fs.clear() between the calls to close() and open(), and then everything will work like we all expect it to work.

      @@ -738,16 +701,15 @@ New:

      If the headers are in ${prefix}/include/g++-3, or if the installed library's name looks like libstdc++-2.10.a - or libstdc++-libc6-2.10.so, - then you are using the old libstdc++-v2 library, which is nonstandard - and unmaintained. Do not report problems with -v2 to the -v3 - mailing list. + or libstdc++-libc6-2.10.so, then you are using the old + libstdc++-v2 library, which is nonstandard and unmaintained. Do not + report problems with -v2 to the -v3 mailing list.

      For GCC versions 3.0 and 3.1 the libstdc++-v3 header files are - installed in ${prefix}/include/g++-v3 (see the 'v'?). - Starting with version 3.2 the headers are installed in - ${prefix}/include/c++/${version} as this prevents - headers from previous versions being found by mistake. + installed in ${prefix}/include/g++-v3 (see the 'v'?). + Starting with version 3.2 the headers are installed in + ${prefix}/include/c++/${version} as this prevents + headers from previous versions being found by mistake.

      glibc If you're on a GNU/Linux system and have just upgraded to @@ -787,13 +749,13 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff when compiling and linking:

      -    // compile the library components
      +    // compile your library components
           g++ -fPIC -c a.cc
           g++ -fPIC -c b.cc
           ...
           g++ -fPIC -c z.cc
       
      -    // create the library
      +    // create your library
           g++ -fPIC -shared -rdynamic -o libfoo.so a.o b.o ... z.o
       
           // link the executable
      @@ -826,7 +788,7 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff
                entry, it is a Good Thing if you can additionally create a small
                test program to test for the presence of the bug that your
                patch fixes.  Bugs have a way of being reintroduced; if an old
      -         bug creeps back in, it will be caught immediately by the 
      +         bug creeps back in, it will be caught immediately by the
                testsuite -- but only if such a test exists.
             

      @@ -903,7 +865,8 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff

      In particular, string is not from SGI and makes no use of their "rope" class (which is included as an optional extension), nor is valarray and some others. - Classes like vector<> are, however. + Classes like vector<> are, however we have + made significant changes to them since then.

      The FAQ for SGI's STL (one jump off of their main page) is recommended reading. @@ -949,7 +912,6 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff

      This is a bit cleaner than defining typedefs for all the instantiations you might need.

      -

      Extensions to the library have their own page.

      @@ -962,15 +924,21 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff

      5.6 Is libstdc++-v3 thread-safe?

      -

      When the system's libc is itself thread-safe, a non-generic - implementation of atomicity.h exists for the architecture, and gcc - itself reports a thread model other than single; libstdc++-v3 - strives to be thread-safe. The user-code must guard against - concurrent method calls which may access any particular library - object's state. Typically, the application programmer may infer - what object locks must be held based on the objects referenced in - a method call. Without getting into great detail, here is an - example which requires user-level locks: +

      libstdc++-v3 strives to be thread-safe when all of the following + conditions are met: +

      +
        +
      • The system's libc is itself thread-safe,
      • +
      • gcc -v reports a thread model other than 'single',
      • +
      • [pre-3.3 only] a non-generic implementation of atomicity.h + exists for the architecture in question.
      • +
      +

      The user-code must guard against concurrent method calls which may + access any particular library object's state. Typically, the + application programmer may infer what object locks must be held + based on the objects referenced in a method call. Without getting + into great detail, here is an example which requires user-level + locks:

            library_class_a shared_object_a;
      @@ -994,12 +962,12 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff
              object_a.mutate ();
            } 

      All library objects are safe to use in a multithreaded program as - long as each thread carefully locks out access by any other thread - while it uses any object visible to another thread. In general, + long as each thread carefully locks out access by any other + thread while it uses any object visible to another thread, i.e., + treat library objects like any other shared resource. In general, this requirement includes both read and write access to objects; - unless otherwise documented as safe, do not assume that two - threads may access a shared standard library object at the - same time. + unless otherwise documented as safe, do not assume that two threads + may access a shared standard library object at the same time.

      See chapters 17 (library introduction), 23 @@ -1051,7 +1019,7 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff a "free-standing implementation" that doesn't include (much of) the standard library. It is a good basis for the work to come.

      -

      A useful C++ ABI must also incorporate many details of the standard +

      A useful C++ ABI must also incorporate many details of the standard library implementation. For a C ABI, the layouts of a few structs (such as FILE, stat, jmpbuf, and the like) and a few macros suffice. For C++, the details include the complete set of names of functions @@ -1063,7 +1031,7 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff those details so that future bug fixes and optimizations don't force breaking the ABI.

      -

      There are ways to help isolate library implementation details from the +

      There are ways to help isolate library implementation details from the ABI, but they trade off against speed. Library details used in inner loops (e.g., getchar) must be exposed and frozen for all time, but many others may reasonably be kept hidden from user code, diff --git a/libstdc++-v3/docs/html/faq/index.txt b/libstdc++-v3/docs/html/faq/index.txt index 3dd49c7f8d70..e671dd4a1827 100644 --- a/libstdc++-v3/docs/html/faq/index.txt +++ b/libstdc++-v3/docs/html/faq/index.txt @@ -4,9 +4,9 @@ The latest version of this document is always available at [1]http://gcc.gnu.org/onlinedocs/libstdc++/faq/. The main documentation page is at - [2]http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html. + [2]http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html. - To the [3]libstdc++-v3 homepage. + To the [3]libstdc++-v3 homepage. _________________________________________________________________ Questions @@ -122,12 +122,12 @@ 1.4 How do I get libstdc++? - The fourteenth (and latest) snapshot of libstdc++-v3 is [60]available - via ftp. - - The [61]homepage has instructions for retrieving the latest CVS + The [60]homepage has instructions for retrieving the latest CVS sources, and for browsing the CVS sources over the web. + Stable versions of libstdc++-v3 are included with releases of [61]the + GCC compilers. + The subset commonly known as the Standard Template Library (chapters 23 through 25, mostly) is adapted from the final release of the SGI STL. @@ -253,7 +253,8 @@ 2.4 How do I know if it works? libstdc++-v3 comes with its own testsuite. You do not need to actually - install the library ("make install") to run the testsuite. + install the library ("make install") to run the testsuite, but you do + need DejaGNU, as described [73]here. To run the testsuite on the library after building it, use "make check" while in your build directory. To run the testsuite on the @@ -265,7 +266,7 @@ up your idea and send it to the list! _________________________________________________________________ -2.4 This library is HUGE! And what's libsupc++? +2.5 This library is HUGE! And what's libsupc++? Usually the size of libraries on disk isn't noticeable. When a link editor (or simply "linker") pulls things from a static archive @@ -291,7 +292,7 @@ people don't like it, so here are two pseudo-solutions: If the only functions from libstdc++.a which you need are language - support functions (those listed in [73]clause 18 of the standard, + support functions (those listed in [74]clause 18 of the standard, e.g., new and delete), then try linking against libsupc++.a (usually specifying -lsupc++ when calling g++ for the final link step will do it). This library contains only those support routines, one per object @@ -386,7 +387,7 @@ - < /dev/null" to display a list of predefined macros for any particular installation. - This has been discussed on the mailing lists [74]quite a bit. + This has been discussed on the mailing lists [75]quite a bit. This method is something of a wart. We'd like to find a cleaner solution, but nobody yet has contributed the time. @@ -395,7 +396,7 @@ 3.6 OS X ctype.h is broken! How can I hack it? This is a long-standing bug in the OS X support. Fortunately, the - patch is quite simple, and well-known. [75]Here's a link to the + patch is quite simple, and well-known. [76]Here's a link to the solution. _________________________________________________________________ @@ -413,11 +414,11 @@ 3.8 Recent GNU/Linux glibc required? - For 3.2.1 (shared library version 5.0.1) and later, the library uses - localization and formatting code from the system C library (glibc) - version 2.2.5. That version of glibc is over a year old and contains - necessary bugfixes. Many GNU/Linux distros make glibc version 2.3.x - available now. + When running on GNU/Linux, libstdc++ 3.2.1 (shared library version + 5.0.1) and later uses localization and formatting code from the system + C library (glibc) version 2.2.5. That version of glibc is over a year + old and contains necessary bugfixes. Many GNU/Linux distros make glibc + version 2.3.x available now. The guideline is simple: the more recent the C++ library, the more recent the C library. (This is also documented in the main GCC @@ -433,7 +434,7 @@ enable itself. You can fix the problems yourself, and learn more about the situation, - by reading [76]this short thread ("_GLIBCPP_USE_WCHAR_T undefined in + by reading [77]this short thread ("_GLIBCPP_USE_WCHAR_T undefined in FreeBSD's c++config.h?"). _________________________________________________________________ @@ -446,7 +447,7 @@ For 3.0.1, the most common "bug" is an apparently missing "../" in include/Makefile, resulting in files like gthr.h and gthr-single.h not - being found. Please read [77]the configuration instructions for GCC, + being found. Please read [78]the configuration instructions for GCC, specifically the part about configuring in a separate build directory, and how strongly recommended it is. Building in the source directory is fragile, is rarely tested, and tends to break, as in this case. @@ -454,7 +455,7 @@ For 3.1, the most common "bug" is a parse error when using , ending with a message, "bits/basic_file.h:52: parse error before `{' - token." Please read [78]the installation instructions for GCC, + token." Please read [79]the installation instructions for GCC, specifically the part about not installing newer versions on top of older versions. If you install 3.1 over a 3.0.x release, then the wrong basic_file.h header will be found (its location changed between @@ -467,53 +468,17 @@ 4.1 What works already? - This is a verbatim clip from the "Status" section of the RELEASE-NOTES - for the latest snapshot. For a list of fixed bugs, see that file. + Short answer: Pretty much everything works except for some corner + cases. Also, localization is incomplete. For whether it works well, or + as you expect it to work, see 5.2. + + Long answer: See the docs/html/17_intro/CHECKLIST file, which is badly + outdated... + + What follows is a verbatim clip from the "Status" section of the + RELEASE-NOTES for the latest snapshot. For a list of fixed bugs, see + that file. New: ---- -(post 3.0.97) -- more doxygen documentation -- more named locale fixups -- stdio_filebuf that takes fd, FILE -- io performance tuning -- allocation tuning, valgrind fixups -- __cxa_demangle now supported -(3.0.97) -- more doxygen documentation. -- more named locale bug fixes -- support for symbol versioning when using GNU ld >= 2.12 -- wide-io -- tuning for executable size -(3.0.96) -- more doxygen documentation. -- extensions moved out of namespace std -- HPUX long long support -- more string optimizations -- support for NetBSD cross compiles -- concept_check merge from boost -- header simplification -- named locale bug shakeout -- thread testsuite -(3.0.95) -- add S390, m68k, x86-64 support. -- doxygen documentation has been extended, including man pages. -- verbose terminate handling has been added. -- some libsupc++ tweaks -- warnings for deprecated headers now active. -- dejagnu testsuite preliminary documentation. -- dejagnu testsuite default. -- dejagnu testsuite cross compiler, multilib safe. -- long long iostreams on by default, rework of ISO C99 support. -- iterator re-write and testsuites. -- container testsuites. -- allocator revamp and testsuites. -- more concept-checking work. -- basic_string optimization and MT fixes. -- new limits implementation. -- update -fno-exceptions code, verify it works. -- full named locale support fpr all facets, choice of gnu, - ieee_1003.1-200x (POSIX 2), or generic models. Full support depends - on target OS and underlying "C" library support. _________________________________________________________________ 4.2 Bugs in gcc/g++ (not libstdc++-v3) @@ -523,30 +488,30 @@ New: libstdc++. If you are experiencing one of these problems, you can find more information on the libstdc++ and the GCC mailing lists. - Before reporting a bug, examine the [79]bugs database with the + Before reporting a bug, examine the [80]bugs database with the category set to "libstdc++". The BUGS file in the source tree also tracks known serious problems. * Debugging is problematic, due to bugs in line-number generation (mostly fixed in the compiler) and gdb lagging behind the compiler (lack of personnel). We recommend configuring the compiler using --with-dwarf2 if the DWARF2 debugging format is not already the - default on your platform. Also, [80]changing your GDB settings can + default on your platform. Also, [81]changing your GDB settings can have a profound effect on your C++ debugging experiences. :-) _________________________________________________________________ 4.3 Bugs in the C++ language/lib specification - Yes, unfortunately, there are some. In a [81]message to the list, + Yes, unfortunately, there are some. In a [82]message to the list, Nathan Myers announced that he has started a list of problems in the ISO C++ Standard itself, especially with regard to the chapters that - concern the library. The list itself is [82]posted on his website. + concern the library. The list itself is [83]posted on his website. Developers who are having problems interpreting the Standard may wish to consult his notes. For those people who are not part of the ISO Library Group (i.e., nearly all of us needing to read this page in the first place :-), a - public list of the library defects is occasionally published [83]here. - Some of these have resulted in [84]code changes. + public list of the library defects is occasionally published [84]here. + Some of these have resulted in [85]code changes. _________________________________________________________________ 4.4 Things in libstdc++ that only look like bugs @@ -578,7 +543,7 @@ New: state on the previous file. The reason is that the state flags are not cleared on a successful call to open(). The standard unfortunately did not specify behavior in this case, and to everybody's great sorrow, - the [85]proposed LWG resolution (see DR #22) is to leave the flags + the [86]proposed LWG resolution in DR #22 is to leave the flags unchanged. You must insert a call to fs.clear() between the calls to close() and open(), and then everything will work like we all expect it to work. @@ -588,7 +553,7 @@ New: same namespace as other comparison functions (e.g., 'using' them and the header), then you will suddenly be faced with huge numbers of ambiguity errors. This was discussed on the -v3 list; - Nathan Myers [86]sums things up here. The collisions with + Nathan Myers [87]sums things up here. The collisions with vector/string iterator types have been fixed for 3.1. The g++-3 headers are not ours @@ -596,7 +561,7 @@ New: If you have found an extremely broken header file which is causing problems for you, look carefully before submitting a "high" priority bug report (which you probably shouldn't do anyhow; see the last - paragraph of the page describing [87]the GCC bug database). + paragraph of the page describing [88]the GCC bug database). If the headers are in ${prefix}/include/g++-3, or if the installed library's name looks like libstdc++-2.10.a or libstdc++-libc6-2.10.so, @@ -621,7 +586,7 @@ type has changed in glibc 2.2. The patch is at http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff - Note that 2.95.x shipped with the [88]old v2 library which is no + Note that 2.95.x shipped with the [89]old v2 library which is no longer maintained. Also note that gcc 2.95.3 fixes this problem, but requires a separate patch for libstdc++-v3. @@ -634,18 +599,18 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff visibility, or you just plain forgot, etc). More information, including how to optionally enable/disable the - checks, is available [89]here. + checks, is available [90]here. dlopen/dlsym If you are using the C++ library across dynamically-loaded objects, make certain that you are passing the correct options when compiling and linking: - // compile the library components + // compile your library components g++ -fPIC -c a.cc g++ -fPIC -c b.cc ... g++ -fPIC -c z.cc - // create the library + // create your library g++ -fPIC -shared -rdynamic -o libfoo.so a.o b.o ... z.o // link the executable @@ -653,11 +618,11 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff "memory leaks" in containers A few people have reported that the standard containers appear to leak memory when tested with memory - checkers such as [90]valgrind. The library's default allocators keep + checkers such as [91]valgrind. The library's default allocators keep free memory in a pool for later reuse, rather than returning it to the OS. Although this memory is always reachable by the library and is never lost, memory debugging tools can report it as a leak. If you - want to test the library for memory leaks please read [91]Tips for + want to test the library for memory leaks please read [92]Tips for memory leak hunting first. _________________________________________________________________ @@ -665,16 +630,16 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff If you have found a bug in the library and you think you have a working fix, then send it in! The main GCC site has a page on - [92]submitting patches that covers the procedure, but for libstdc++ + [93]submitting patches that covers the procedure, but for libstdc++ you should also send the patch to our mailing list in addition to the - GCC patches mailing list. The libstdc++ [93]contributors' page also + GCC patches mailing list. The libstdc++ [94]contributors' page also talks about how to submit patches. In addition to the description, the patch, and the ChangeLog entry, it is a Good Thing if you can additionally create a small test program to test for the presence of the bug that your patch fixes. Bugs have a way of being reintroduced; if an old bug creeps back in, it will be - caught immediately by the [94]testsuite -- but only if such a test + caught immediately by the [95]testsuite -- but only if such a test exists. _________________________________________________________________ @@ -708,7 +673,7 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff libstdc++. Some of that is already happening, see 4.2. Some of those changes are being predicted by the library maintainers, and we add code to the library based on what the current proposed - resolution specifies. Those additions are listed in [95]the + resolution specifies. Those additions are listed in [96]the extensions page. 2. Performance tuning. Lots of performance tuning. This too is already underway for post-3.0 releases, starting with memory @@ -724,20 +689,21 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff type from C99.) Bugfixes and rewrites (to improve or fix thread safety, for instance) will of course be a continuing task. - [96]This question about the next libstdc++ prompted some brief but - interesting [97]speculation. + [97]This question about the next libstdc++ prompted some brief but + interesting [98]speculation. _________________________________________________________________ 5.3 What about the STL from SGI? - The [98]STL from SGI, version 3.3, was the most recent merge of the + The [99]STL from SGI, version 3.3, was the most recent merge of the STL codebase. The code in libstdc++ contains many fixes and changes, and it is very likely that the SGI code is no longer under active development. We expect that no future merges will take place. In particular, string is not from SGI and makes no use of their "rope" class (which is included as an optional extension), nor is valarray - and some others. Classes like vector<> are, however. + and some others. Classes like vector<> are, however we have made + significant changes to them since then. The FAQ for SGI's STL (one jump off of their main page) is recommended reading. @@ -779,7 +745,7 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff This is a bit cleaner than defining typedefs for all the instantiations you might need. - Extensions to the library have [99]their own page. + Extensions to the library have [100]their own page. _________________________________________________________________ 5.5 [removed] @@ -790,15 +756,18 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff 5.6 Is libstdc++-v3 thread-safe? - When the system's libc is itself thread-safe, a non-generic - implementation of atomicity.h exists for the architecture, and gcc - itself reports a thread model other than single; libstdc++-v3 strives - to be thread-safe. The user-code must guard against concurrent method - calls which may access any particular library object's state. - Typically, the application programmer may infer what object locks must - be held based on the objects referenced in a method call. Without - getting into great detail, here is an example which requires - user-level locks: + libstdc++-v3 strives to be thread-safe when all of the following + conditions are met: + * The system's libc is itself thread-safe, + * gcc -v reports a thread model other than 'single', + * [pre-3.3 only] a non-generic implementation of atomicity.h exists + for the architecture in question. + + The user-code must guard against concurrent method calls which may + access any particular library object's state. Typically, the + application programmer may infer what object locks must be held based + on the objects referenced in a method call. Without getting into great + detail, here is an example which requires user-level locks: library_class_a shared_object_a; thread_main () { @@ -823,13 +792,14 @@ a All library objects are safe to use in a multithreaded program as long as each thread carefully locks out access by any other thread while it - uses any object visible to another thread. In general, this - requirement includes both read and write access to objects; unless - otherwise documented as safe, do not assume that two threads may - access a shared standard library object at the same time. + uses any object visible to another thread, i.e., treat library objects + like any other shared resource. In general, this requirement includes + both read and write access to objects; unless otherwise documented as + safe, do not assume that two threads may access a shared standard + library object at the same time. - See chapters [100]17 (library introduction), [101]23 (containers), and - [102]27 (I/O) for more information. + See chapters [101]17 (library introduction), [102]23 (containers), and + [103]27 (I/O) for more information. _________________________________________________________________ 5.7 How do I get a copy of the ISO C++ Standard? @@ -840,11 +810,11 @@ a their two-meeting commitment for voting rights, may get a copy of the standard from their respective national standards organization. In the USA, this national standards organization is ANSI and their website is - right [103]here. (And if you've already registered with them, clicking + right [104]here. (And if you've already registered with them, clicking this link will take you to directly to the place where you can - [104]buy the standard on-line. + [105]buy the standard on-line. - Who is your country's member body? Visit the [105]ISO homepage and + Who is your country's member body? Visit the [106]ISO homepage and find out! _________________________________________________________________ @@ -895,8 +865,8 @@ a encompasses the standard library. _________________________________________________________________ - See [106]license.html for copying conditions. Comments and suggestions - are welcome, and may be sent to [107]the libstdc++ mailing list. + See [107]license.html for copying conditions. Comments and suggestions + are welcome, and may be sent to [108]the libstdc++ mailing list. References @@ -959,8 +929,8 @@ References 57. http://gcc.gnu.org/ 58. http://gcc.gnu.org/gcc-3.0/buildstat.html 59. http://gcc.gnu.org/libstdc++/ - 60. http://gcc.gnu.org/libstdc++/index.html#download - 61. http://gcc.gnu.org/libstdc++/ + 60. http://gcc.gnu.org/libstdc++/ + 61. http://gcc.gnu.org/releases.html 62. ../17_intro/contribute.html 63. http://www.boost.org/ 64. http://gcc.gnu.org/extensions.html @@ -972,38 +942,39 @@ References 70. ../17_intro/RELEASE-NOTES 71. http://www.gnu.org/software/cvs/cvs.html 72. http://www.cvshome.org/ - 73. ../18_support/howto.html - 74. http://gcc.gnu.org/cgi-bin/htsearch?method=and&format=builtin-long&sort=score&words=_XOPEN_SOURCE+Solaris - 75. http://gcc.gnu.org/ml/gcc/2002-03/msg00817.html - 76. http://gcc.gnu.org/ml/libstdc++/2003-02/subjects.html#00286 - 77. http://gcc.gnu.org/install/configure.html - 78. http://gcc.gnu.org/install/ - 79. http://gcc.gnu.org/bugs.html - 80. http://gcc.gnu.org/ml/libstdc++/2002-02/msg00034.html - 81. http://gcc.gnu.org/ml/libstdc++/1998/msg00006.html - 82. http://www.cantrip.org/draft-bugs.txt - 83. http://anubis.dkuug.dk/jtc1/sc22/wg21/ - 84. ../faq/index.html#5_2 - 85. ../ext/howto.html#5 - 86. http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html - 87. http://gcc.gnu.org/gnatswrite.html - 88. ../faq/index.html#4_4_interface - 89. ../19_diagnostics/howto.html#3 - 90. http://developer.kde.org/~sewardj/ - 91. ../debug.html#mem - 92. http://gcc.gnu.org/contribute.html - 93. ../17_intro/contribute.html - 94. ../faq/index.html#2_4 - 95. ../ext/howto.html#5 - 96. http://gcc.gnu.org/ml/libstdc++/1999/msg00080.html - 97. http://gcc.gnu.org/ml/libstdc++/1999/msg00084.html - 98. http://www.sgi.com/Technology/STL/ - 99. ../ext/howto.html - 100. ../17_intro/howto.html#3 - 101. ../23_containers/howto.html#3 - 102. ../27_io/howto.html#9 - 103. http://www.ansi.org/ - 104. http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%2D1998 - 105. http://www.iso.ch/ - 106. ../17_intro/license.html - 107. mailto:libstdc++@gcc.gnu.org + 73. http://gcc.gnu.org/install/test.html + 74. ../18_support/howto.html + 75. http://gcc.gnu.org/cgi-bin/htsearch?method=and&format=builtin-long&sort=score&words=_XOPEN_SOURCE+Solaris + 76. http://gcc.gnu.org/ml/gcc/2002-03/msg00817.html + 77. http://gcc.gnu.org/ml/libstdc++/2003-02/subjects.html#00286 + 78. http://gcc.gnu.org/install/configure.html + 79. http://gcc.gnu.org/install/ + 80. http://gcc.gnu.org/bugs.html + 81. http://gcc.gnu.org/ml/libstdc++/2002-02/msg00034.html + 82. http://gcc.gnu.org/ml/libstdc++/1998/msg00006.html + 83. http://www.cantrip.org/draft-bugs.txt + 84. http://anubis.dkuug.dk/jtc1/sc22/wg21/ + 85. ../faq/index.html#5_2 + 86. ../ext/howto.html#5 + 87. http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html + 88. http://gcc.gnu.org/gnatswrite.html + 89. ../faq/index.html#4_4_interface + 90. ../19_diagnostics/howto.html#3 + 91. http://developer.kde.org/~sewardj/ + 92. ../debug.html#mem + 93. http://gcc.gnu.org/contribute.html + 94. ../17_intro/contribute.html + 95. ../faq/index.html#2_4 + 96. ../ext/howto.html#5 + 97. http://gcc.gnu.org/ml/libstdc++/1999/msg00080.html + 98. http://gcc.gnu.org/ml/libstdc++/1999/msg00084.html + 99. http://www.sgi.com/Technology/STL/ + 100. ../ext/howto.html + 101. ../17_intro/howto.html#3 + 102. ../23_containers/howto.html#3 + 103. ../27_io/howto.html#9 + 104. http://www.ansi.org/ + 105. http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%2D1998 + 106. http://www.iso.ch/ + 107. ../17_intro/license.html + 108. mailto:libstdc++@gcc.gnu.org -- 2.43.5