From 39ec52254eda7cc2fab94aa7a5bb2fd1f395296b Mon Sep 17 00:00:00 2001
From: Phil Edwards 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 [18.5.1]/7 The return value of
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. 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 c95f956a370..df7305cc033 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 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.
<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.)
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 3660ce8fef4..ac51f450673 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
.
- _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.
+
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 5cf4f4f05ef..4a0b6a927fb 100644
--- a/libstdc++-v3/docs/html/27_io/howto.html
+++ b/libstdc++-v3/docs/html/27_io/howto.html
@@ -741,8 +741,9 @@
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/faq/index.html b/libstdc++-v3/docs/html/faq/index.html
index 2a5c4d449b0..d952c9d47f5 100644
--- a/libstdc++-v3/docs/html/faq/index.html
+++ b/libstdc++-v3/docs/html/faq/index.html
@@ -10,9 +10,9 @@
1.1 What is libstdc++-v3?
@@ -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 @@
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 @@
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. -
+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! -
+(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. -
+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...-->
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...-->
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. -
+This is fixed in 3.2.2.
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...-->
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...-->
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.diffIn particular,
string
is not from SGI and makes no use of their "rope" class (which is included as an optional extension), nor isvalarray
and some others. - Classes likevector<>
are, however. + Classes likevector<>
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: +
+
gcc -v
reports a thread model other than 'single',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 3dd49c7f8d7..e671dd4a182 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