mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-25 12:56:05 +08:00
Makefile.am: Edit xml file list.
2008-08-27 Benjamin Kosnik <bkoz@redhat.com> * doc/Makefile.am: Edit xml file list. * doc/Makefile.in: Regenerate. * configure: Regenerate. * doc/xml/manual/intro.xml: Edit, correct links, structure. * doc/xml/manual/configure.xml: Same. * doc/xml/manual/debug.xml: Same. * doc/xml/manual/test.xml: Same. * doc/xml/manual/build.xml: Remove. * doc/xml/manual/prerequisites.xml: Add. * doc/html/*: Regenerate. From-SVN: r139690
This commit is contained in:
parent
fd990e649d
commit
41061822aa
@ -1,3 +1,16 @@
|
||||
2008-08-27 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* doc/Makefile.am: Edit xml file list.
|
||||
* doc/Makefile.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
* doc/xml/manual/intro.xml: Edit, correct links, structure.
|
||||
* doc/xml/manual/configure.xml: Same.
|
||||
* doc/xml/manual/debug.xml: Same.
|
||||
* doc/xml/manual/test.xml: Same.
|
||||
* doc/xml/manual/build.xml: Remove.
|
||||
* doc/xml/manual/prerequisites.xml: Add.
|
||||
* doc/html/*: Regenerate.
|
||||
|
||||
2008-08-27 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* include/tr1_impl/hashtable (_Hashtable<>): Add missing pointer and
|
||||
|
6
libstdc++-v3/configure
vendored
6
libstdc++-v3/configure
vendored
@ -14157,7 +14157,7 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
# Checks for compiler support that doesn't require linking.
|
||||
# Checks for compiler support that don't require linking.
|
||||
|
||||
# All these tests are for C++; save the language and the compiler flags.
|
||||
# The CXXFLAGS thing is suspicious, but based on similar bits previously
|
||||
@ -17363,7 +17363,7 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
# Checks for operating systems support that doesn't require linking.
|
||||
# Checks for operating systems support that don't require linking.
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for EOWNERDEAD" >&5
|
||||
@ -103227,7 +103227,7 @@ esac
|
||||
|
||||
fi
|
||||
|
||||
# At some point, we should differentiate between aritectures
|
||||
# At some point, we should differentiate between architectures
|
||||
# like x86, which have long double versions, and alpha/powerpc/etc.,
|
||||
# which don't. For the time being, punt.
|
||||
if test x"long_double_math_on_this_cpu" = x"yes"; then
|
||||
|
@ -79,7 +79,6 @@ xml_sources = \
|
||||
${xml_srcdir}/manual/auto_ptr.xml \
|
||||
${xml_srcdir}/manual/backwards_compatibility.xml \
|
||||
${xml_srcdir}/manual/bitmap_allocator.xml \
|
||||
${xml_srcdir}/manual/build.xml \
|
||||
${xml_srcdir}/manual/build_hacking.xml \
|
||||
${xml_srcdir}/manual/codecvt.xml \
|
||||
${xml_srcdir}/manual/concurrency.xml \
|
||||
@ -101,6 +100,7 @@ xml_sources = \
|
||||
${xml_srcdir}/manual/mt_allocator.xml \
|
||||
${xml_srcdir}/manual/numerics.xml \
|
||||
${xml_srcdir}/manual/parallel_mode.xml \
|
||||
${xml_srcdir}/manual/prerequisites.xml \
|
||||
${xml_srcdir}/manual/internals.xml \
|
||||
${xml_srcdir}/manual/shared_ptr.xml \
|
||||
${xml_srcdir}/manual/spine.xml \
|
||||
|
@ -304,7 +304,6 @@ xml_sources = \
|
||||
${xml_srcdir}/manual/auto_ptr.xml \
|
||||
${xml_srcdir}/manual/backwards_compatibility.xml \
|
||||
${xml_srcdir}/manual/bitmap_allocator.xml \
|
||||
${xml_srcdir}/manual/build.xml \
|
||||
${xml_srcdir}/manual/build_hacking.xml \
|
||||
${xml_srcdir}/manual/codecvt.xml \
|
||||
${xml_srcdir}/manual/concurrency.xml \
|
||||
@ -326,6 +325,7 @@ xml_sources = \
|
||||
${xml_srcdir}/manual/mt_allocator.xml \
|
||||
${xml_srcdir}/manual/numerics.xml \
|
||||
${xml_srcdir}/manual/parallel_mode.xml \
|
||||
${xml_srcdir}/manual/prerequisites.xml \
|
||||
${xml_srcdir}/manual/internals.xml \
|
||||
${xml_srcdir}/manual/shared_ptr.xml \
|
||||
${xml_srcdir}/manual/spine.xml \
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<a class="ulink" href="http://www.fsf.org/" target="_top">FSF
|
||||
</a>
|
||||
</p></div><div><div class="legalnotice"><a id="id344716"></a><p>
|
||||
</p></div><div><div class="legalnotice"><a id="id552919"></a><p>
|
||||
<a class="ulink" href="17_intro/license.html" target="_top">License
|
||||
</a>
|
||||
</p></div></div></div><hr /></div><p>
|
||||
|
@ -436,54 +436,54 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.
|
||||
<a class="ulink" href="http://gcc.gnu.org/PR24660" target="_top">24660: versioning weak symbols in libstdc++</a>
|
||||
</p><p>
|
||||
<a class="ulink" href="http://gcc.gnu.org/PR19664" target="_top">19664: libstdc++ headers should have pop/push of the visibility around the declarations</a>
|
||||
</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id473963"></a><p><span class="title"><i>
|
||||
</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id484026"></a><p><span class="title"><i>
|
||||
ABIcheck, a vague idea of checking ABI compatibility
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://abicheck.sourceforge.net/" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id473980"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id484043"></a><p><span class="title"><i>
|
||||
C++ ABI Reference
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.codesourcery.com/cxx-abi" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id473998"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id484061"></a><p><span class="title"><i>
|
||||
Intel® Compilers for Linux* -Compatibility with the GNU Compilers
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id474016"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id484078"></a><p><span class="title"><i>
|
||||
Intel® Compilers for Linux* -Compatibility with the GNU Compilers
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id369651"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id529978"></a><p><span class="title"><i>
|
||||
Sun Solaris 2.9 : Linker and Libraries Guide (document 816-1386)
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://docs.sun.com/?p=/doc/816-1386&a=load" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id369667"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id529995"></a><p><span class="title"><i>
|
||||
Sun Solaris 2.9 : C++ Migration Guide (document 816-2459)
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://docs.sun.com/db/prod/solaris.9" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id369685"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id530013"></a><p><span class="title"><i>
|
||||
ELF Symbol Versioning
|
||||
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://people.redhat.com/drepper/symbol-versioning" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id369713"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id530041"></a><p><span class="title"><i>
|
||||
C++ ABI for the ARM Architecture
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.arm.com/miscPDFs/8033.pdf" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id369730"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id530058"></a><p><span class="title"><i>
|
||||
Dynamic Shared Objects: Survey and Issues
|
||||
</i>. </span><span class="subtitle">
|
||||
ISO C++ J16/06-0046
|
||||
. </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1976.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id369763"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id530090"></a><p><span class="title"><i>
|
||||
Versioning With Namespaces
|
||||
</i>. </span><span class="subtitle">
|
||||
ISO C++ J16/06-0083
|
||||
|
@ -72,11 +72,11 @@ _Alloc_traits</code> have been removed.
|
||||
<span class="type">__alloc</span> to select an underlying allocator that
|
||||
satisfied memory allocation requests. The selection of this
|
||||
underlying allocator was not user-configurable.
|
||||
</p><div class="table"><a id="id418406"></a><p class="title"><b>Table B.1. Extension Allocators</b></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator (3.4)</th><th align="left">Header (3.4)</th><th align="left">Allocator (3.[0-3])</th><th align="left">Header (3.[0-3])</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::new_allocator<T></code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="classname">std::__new_alloc</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::malloc_allocator<T></code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="classname">std::__malloc_alloc_template<int></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator<T></code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="classname">std::debug_alloc<T></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc<T></code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="classname">std::__default_alloc_template<bool,int></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc<T></code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><code class="classname">__gnu_cxx::bitmap_allocator<T></code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> Releases after gcc-3.4 have continued to add to the collection
|
||||
</p><div class="table"><a id="id488788"></a><p class="title"><b>Table B.1. Extension Allocators</b></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator (3.4)</th><th align="left">Header (3.4)</th><th align="left">Allocator (3.[0-3])</th><th align="left">Header (3.[0-3])</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::new_allocator<T></code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="classname">std::__new_alloc</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::malloc_allocator<T></code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="classname">std::__malloc_alloc_template<int></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator<T></code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="classname">std::debug_alloc<T></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc<T></code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="classname">std::__default_alloc_template<bool,int></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc<T></code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><code class="classname">__gnu_cxx::bitmap_allocator<T></code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> 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.
|
||||
</p><div class="table"><a id="id476738"></a><p class="title"><b>Table B.2. Extension Allocators Continued</b></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator</th><th align="left">Include</th><th align="left">Version</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::array_allocator<T></code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left">4.0.0</td></tr><tr><td align="left"><code class="classname">__gnu_cxx::throw_allocator<T></code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left">4.2.0</td></tr></tbody></table></div></div><br class="table-break" /><p>
|
||||
</p><div class="table"><a id="id594393"></a><p class="title"><b>Table B.2. Extension Allocators Continued</b></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator</th><th align="left">Include</th><th align="left">Version</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::array_allocator<T></code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left">4.0.0</td></tr><tr><td align="left"><code class="classname">__gnu_cxx::throw_allocator<T></code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left">4.2.0</td></tr></tbody></table></div></div><br class="table-break" /><p>
|
||||
Debug mode first appears.
|
||||
</p><p>
|
||||
Precompiled header support <acronym class="acronym">PCH</acronym> support.
|
||||
|
@ -14,8 +14,8 @@ 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
|
||||
“<span class="quote">obvious</span>” classes didn't get included.
|
||||
</p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id442299"></a>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id442331"></a>No <code class="code">cout</code> in <code class="code">ostream.h</code>, no <code class="code">cin</code> in <code class="code">istream.h</code></h4></div></div></div><p>
|
||||
</p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id508903"></a>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id508935"></a>No <code class="code">cout</code> in <code class="code">ostream.h</code>, no <code class="code">cin</code> in <code class="code">istream.h</code></h4></div></div></div><p>
|
||||
In earlier versions of the standard,
|
||||
<code class="filename">fstream.h</code>,
|
||||
<code class="filename">ostream.h</code>
|
||||
@ -41,7 +41,7 @@ considered replaced and rewritten.
|
||||
archived. The code is considered replaced and rewritten.
|
||||
</p><p>
|
||||
Portability notes and known implementation limitations are as follows.
|
||||
</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id386246"></a>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p>
|
||||
</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id509035"></a>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p>
|
||||
Some care is required to support C++ compiler and or library
|
||||
implementation that do not have the standard library in
|
||||
<code class="code">namespace std</code>.
|
||||
@ -105,7 +105,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [
|
||||
AC_DEFINE(HAVE_NAMESPACE_STD,,[Define if g++ supports namespace std. ])
|
||||
fi
|
||||
])
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id386369"></a>Illegal iterator usage</h4></div></div></div><p>
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id509158"></a>Illegal iterator usage</h4></div></div></div><p>
|
||||
The following illustrate implementation-allowed illegal iterator
|
||||
use, and then correct use.
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p>
|
||||
@ -118,7 +118,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [
|
||||
</p></li><li><p>
|
||||
<code class="code">if (iterator)</code> won't work any more => use
|
||||
<code class="code">if (iterator != iterator_type())</code>
|
||||
</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id386430"></a><code class="code">isspace</code> from <code class="filename">cctype</code> is a macro
|
||||
</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id590218"></a><code class="code">isspace</code> from <code class="filename">cctype</code> is a macro
|
||||
</h4></div></div></div><p>
|
||||
Glibc 2.0.x and 2.1.x define <code class="filename">ctype.h</code> functionality as macros
|
||||
(isspace, isalpha etc.).
|
||||
@ -151,7 +151,7 @@ std:: (__ctype_b[(int) ( ( 'X' ) )] & (unsigned short int) _ISspace ) ;
|
||||
(<code class="filename">ctype.h</code>) and the
|
||||
definitions in namespace <code class="code">std::</code>
|
||||
(<code class="code"><cctype></code>).
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id496113"></a>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id590311"></a>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p>
|
||||
One solution is to add an autoconf-test for this:
|
||||
</p><pre class="programlisting">
|
||||
AC_MSG_CHECKING(for container::at)
|
||||
@ -177,7 +177,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
|
||||
</pre><p>
|
||||
If you are using other (non-GNU) compilers it might be a good idea
|
||||
to check for <code class="code">string::at</code> separately.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id496151"></a>No <code class="code">std::char_traits<char>::eof</code></h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id590349"></a>No <code class="code">std::char_traits<char>::eof</code></h4></div></div></div><p>
|
||||
Use some kind of autoconf test, plus this:
|
||||
</p><pre class="programlisting">
|
||||
#ifdef HAVE_CHAR_TRAITS
|
||||
@ -185,7 +185,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
|
||||
#else
|
||||
#define CPP_EOF EOF
|
||||
#endif
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id496169"></a>No <code class="code">string::clear</code></h4></div></div></div><p>
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id590367"></a>No <code class="code">string::clear</code></h4></div></div></div><p>
|
||||
There are two functions for deleting the contents of a string:
|
||||
<code class="code">clear</code> and <code class="code">erase</code> (the latter returns the
|
||||
string).
|
||||
@ -203,12 +203,12 @@ erase(size_type __pos = 0, size_type __n = npos)
|
||||
Unfortunately, <code class="code">clear</code> is not implemented in this
|
||||
version, so you should use <code class="code">erase</code> (which is probably
|
||||
faster than <code class="code">operator=(charT*)</code>).
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id496214"></a>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id590413"></a>
|
||||
Removal of <code class="code">ostream::form</code> and <code class="code">istream::scan</code>
|
||||
extensions
|
||||
</h4></div></div></div><p>
|
||||
These are no longer supported. Please use stringstreams instead.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id496234"></a>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id590432"></a>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p>
|
||||
Although the ISO standard <code class="code">i/ostringstream</code>-classes are
|
||||
provided, (<code class="filename">sstream</code>), for
|
||||
compatibility with older implementations the pre-ISO
|
||||
@ -296,14 +296,14 @@ any = temp;
|
||||
Another example of using stringstreams is in <a class="link" href="bk01pt05ch13s05.html" title="Shrink to Fit">this howto</a>.
|
||||
</p><p> There is additional information in the libstdc++-v2 info files, in
|
||||
particular “<span class="quote">info iostream</span>”.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id496386"></a>Little or no wide character support</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id590584"></a>Little or no wide character support</h4></div></div></div><p>
|
||||
Classes <code class="classname">wstring</code> and
|
||||
<code class="classname">char_traits<wchar_t></code> are
|
||||
not supported.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id364967"></a>No templatized iostreams</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474404"></a>No templatized iostreams</h4></div></div></div><p>
|
||||
Classes <code class="classname">wfilebuf</code> and
|
||||
<code class="classname">wstringstream</code> are not supported.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id364986"></a>Thread safety issues</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474423"></a>Thread safety issues</h4></div></div></div><p>
|
||||
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
|
||||
@ -361,7 +361,7 @@ libstdc++-v3.
|
||||
of the SGI STL (version 3.3), with extensive changes.
|
||||
</p><p>A more formal description of the V3 goals can be found in the
|
||||
official <a class="ulink" href="../17_intro/DESIGN" target="_top">design document</a>.
|
||||
</p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id365104"></a>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers
|
||||
</p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474542"></a>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers
|
||||
(<code class="code">iostream.h</code>, <code class="code">defalloc.h</code> etc.) are
|
||||
available, unlike previous libstdc++ versions, but inclusion
|
||||
generates a warning that you are using deprecated headers.
|
||||
@ -433,7 +433,7 @@ like <code class="filename">vector.h</code> can be replaced with <code class="fi
|
||||
directive <code class="code">using namespace std;</code> can be put at the global
|
||||
scope. This should be enough to get this code compiling, assuming the
|
||||
other usage is correct.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id365186"></a>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>At this time most of the features of the SGI STL extension have been
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474625"></a>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>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
|
||||
@ -505,7 +505,7 @@ AC_DEFUN([AC_HEADER_EXT_HASH_SET], [
|
||||
AC_DEFINE(HAVE_EXT_HASH_SET,,[Define if ext/hash_set is present. ])
|
||||
fi
|
||||
])
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id363795"></a>No <code class="code">ios::nocreate/ios::noreplace</code>.
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474727"></a>No <code class="code">ios::nocreate/ios::noreplace</code>.
|
||||
</h4></div></div></div><p> The existence of <code class="code">ios::nocreate</code> being used for
|
||||
input-streams has been confirmed, most probably because the author
|
||||
thought it would be more correct to specify nocreate explicitly. So
|
||||
@ -516,7 +516,7 @@ 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 <code class="code">app</code>, <code class="code">ate</code>
|
||||
and <code class="code">trunc</code> (except for <code class="code">app</code> ?).
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id363843"></a>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474775"></a>
|
||||
No <code class="code">stream::attach(int fd)</code>
|
||||
</h4></div></div></div><p>
|
||||
Phil Edwards writes: It was considered and rejected for the ISO
|
||||
@ -539,7 +539,7 @@ No <code class="code">stream::attach(int fd)</code>
|
||||
For another example of this, refer to
|
||||
<a class="ulink" href="http://www.josuttis.com/cppcode/fdstream.html" target="_top">fdstream example</a>
|
||||
by Nicolai Josuttis.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id363907"></a>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id572745"></a>
|
||||
Support for C++98 dialect.
|
||||
</h4></div></div></div><p>Check for complete library coverage of the C++1998/2003 standard.
|
||||
</p><pre class="programlisting">
|
||||
@ -607,7 +607,7 @@ AC_DEFUN([AC_HEADER_STDCXX_98], [
|
||||
AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
|
||||
fi
|
||||
])
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id363935"></a>
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id572772"></a>
|
||||
Support for C++TR1 dialect.
|
||||
</h4></div></div></div><p>Check for library coverage of the TR1 standard.
|
||||
</p><pre class="programlisting">
|
||||
@ -684,7 +684,7 @@ AC_DEFUN([AC_HEADER_TR1_UNORDERED_SET], [
|
||||
AC_DEFINE(HAVE_TR1_UNORDERED_SET,,[Define if tr1/unordered_set is present. ])
|
||||
fi
|
||||
])
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id363978"></a>
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id572816"></a>
|
||||
Support for C++0x dialect.
|
||||
</h4></div></div></div><p>Check for baseline language coverage in the compiler for the C++0xstandard.
|
||||
</p><pre class="programlisting">
|
||||
@ -896,27 +896,27 @@ AC_DEFUN([AC_HEADER_UNORDERED_SET], [
|
||||
AC_DEFINE(HAVE_UNORDERED_SET,,[Define if unordered_set is present. ])
|
||||
fi
|
||||
])
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id364056"></a>
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id572893"></a>
|
||||
Container::iterator_type is not necessarily Container::value_type*
|
||||
</h4></div></div></div><p>
|
||||
This is a change in behavior from the previous version. Now, most
|
||||
<span class="type">iterator_type</span> typedefs in container classes are POD
|
||||
objects, not <span class="type">value_type</span> pointers.
|
||||
</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id364087"></a><p>[<abbr class="abbrev">
|
||||
</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id572925"></a><p>[<abbr class="abbrev">
|
||||
kegel41
|
||||
</abbr>] <span class="title"><i>
|
||||
Migrating to GCC 4.1
|
||||
</i>. </span><span class="author"><span class="firstname">Dan</span> <span class="surname">Kegel</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.kegel.com/gcc/gcc4.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id374201"></a><p>[<abbr class="abbrev">
|
||||
. </span></p></div><div class="biblioentry"><a id="id572957"></a><p>[<abbr class="abbrev">
|
||||
kegel41
|
||||
</abbr>] <span class="title"><i>
|
||||
Building the Whole Debian Archive with GCC 4.1: A Summary
|
||||
</i>. </span><span class="author"><span class="firstname">Martin</span> <span class="surname">Michlmayr</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://lists.debian.org/debian-gcc/2006/03/msg00405.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id374234"></a><p>[<abbr class="abbrev">
|
||||
. </span></p></div><div class="biblioentry"><a id="id572990"></a><p>[<abbr class="abbrev">
|
||||
lbl32
|
||||
</abbr>] <span class="title"><i>
|
||||
Migration guide for GCC-3.2
|
||||
|
@ -103,7 +103,7 @@ else return false.</p></li></ol></div><p>
|
||||
</p><p>
|
||||
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).
|
||||
</p><div class="table"><a id="id390307"></a><p class="title"><b>Table 32.1. Bitmap Allocator Memory Map</b></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left">268</td><td align="left">0</td><td align="left">4294967295</td><td align="left">4294967295</td><td align="left">Data -> Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break" /><p>
|
||||
</p><div class="table"><a id="id588050"></a><p class="title"><b>Table 32.1. Bitmap Allocator Memory Map</b></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left">268</td><td align="left">0</td><td align="left">4294967295</td><td align="left">4294967295</td><td align="left">Data -> Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break" /><p>
|
||||
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
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,181 +1,98 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 2. Setup</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I. Introduction" /><link rel="prev" href="bk01pt01ch01s03.html" title="Bugs" /><link rel="next" href="build.html" title="Build" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Setup</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch01s03.html">Prev</a> </td><th width="60%" align="center">Part I. Introduction</th><td width="20%" align="right"> <a accesskey="n" href="build.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.setup"></a>Chapter 2. Setup</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.configure">Configure</a></span></dt><dt><span class="sect1"><a href="build.html">Build</a></span></dt><dd><dl><dt><span class="sect2"><a href="build.html#build.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="build.html#build.configure">Make</a></span></dt></dl></dd><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.naming">Naming Conventions</a></span></dt><dt><span class="sect2"><a href="test.html#test.utils">Utilities</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">New Test Cases</a></span></dt><dt><span class="sect2"><a href="test.html#test.dejagnu">Test Harness Details</a></span></dt><dt><span class="sect2"><a href="test.html#test.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.configure"></a>Configure</h2></div></div></div><p>
|
||||
Here are some of the non-obvious options to libstdc++'s configure.
|
||||
Keep in mind that
|
||||
|
||||
<a class="ulink" href="http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_node/autoconf_131.html#SEC131" target="_top">they
|
||||
all have opposite forms as well</a>
|
||||
(enable/disable and with/without). The defaults are for <span class="emphasis"><em>current
|
||||
development sources</em></span>, which may be different than those for
|
||||
released versions.
|
||||
</p><p>The canonical way to find out the configure options that are
|
||||
available for a given set of libstdc++ sources is to go to the
|
||||
source directory and then type:<code class="code"> ./configure --help</code>
|
||||
</p><div class="variablelist"><dl><dt><span class="term"><code class="code">--enable-multilib</code>[default]</span></dt><dd><p>This is part of the generic multilib support for building cross
|
||||
compilers. As such, targets like "powerpc-elf" will have
|
||||
libstdc++ built many different ways: "-msoft-float"
|
||||
and not, etc. A different libstdc++ will be built for each of
|
||||
the different multilib versions. This option is on by default.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-sjlj-exceptions</code></span></dt><dd><p>Forces old, set-jump/long-jump exception handling model. If
|
||||
at all possible, the new, frame unwinding exception handling routines
|
||||
should be used instead, as they significantly reduce both
|
||||
runtime memory usage and executable size. This option can
|
||||
change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-version-specific-runtime-libs</code></span></dt><dd><p>Specify that run-time libraries should be installed in the
|
||||
compiler-specific subdirectory (i.e.,
|
||||
<code class="code">${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
|
||||
instead of <code class="code">${libdir}</code>. This option is useful if you
|
||||
intend to use several versions of gcc in parallel. In addition,
|
||||
libstdc++'s include files will be installed in
|
||||
<code class="code">${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>,
|
||||
unless you also specify
|
||||
<code class="literal">--with-gxx-include-dir=<code class="filename">dirname</code></code> during configuration.
|
||||
</p></dd><dt><span class="term"><code class="code">--with-gxx-include-dir=<include-files dir></code></span></dt><dd><p>Adds support for named libstdc++ include directory. For instance,
|
||||
the following puts all the libstdc++ headers into a directory
|
||||
called "2.97-20001008" instead of the usual
|
||||
"c++/(version)".
|
||||
</p><pre class="programlisting">
|
||||
--with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</pre></dd><dt><span class="term"><code class="code">--enable-cstdio</code></span></dt><dd><p>This is an abbreviated form of <code class="code">'--enable-cstdio=stdio'</code>
|
||||
(described next). This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-cstdio=OPTION</code></span></dt><dd><p>Select a target-specific I/O package. At the moment, the only
|
||||
choice is to use 'stdio', a generic "C" abstraction.
|
||||
The default is 'stdio'.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-clocale</code></span></dt><dd><p>This is an abbreviated form of <code class="code">'--enable-clocale=generic'</code>
|
||||
(described next). This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-clocale=OPTION</code></span></dt><dd><p>Select a target-specific underlying locale package. The
|
||||
choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix
|
||||
(IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets,
|
||||
'gnu' to specify a model based on functionality from the GNU C
|
||||
library (langinfo/iconv/gettext) (from <a class="ulink" href="http://sources.redhat.com/glibc/" target="_top">glibc</a>, the GNU C
|
||||
library), or 'generic' to use a generic "C"
|
||||
abstraction which consists of "C" locale info.
|
||||
</p><p>As part of the configuration process, the "C" library is
|
||||
probed both for sufficient vintage, and installed locale
|
||||
data. If either of these elements are not present, the C++
|
||||
locale model default to 'generic.' On glibc-based systems of
|
||||
version 2.2.5 and above with installed locale files, 'gnu' is
|
||||
automatically selected.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-allocator</code></span></dt><dd><p>This is an abbreviated form of
|
||||
<code class="code">'--enable-libstdcxx-allocator=auto'</code> (described
|
||||
next). This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-allocator=OPTION </code></span></dt><dd><p>Select a target-specific underlying std::allocator. The
|
||||
choices are 'new' to specify a wrapper for new, 'malloc' to
|
||||
specify a wrapper for malloc, 'mt' for a fixed power of two allocator
|
||||
(<a class="ulink" href="ext/mt_allocator.html" target="_top">documented</a> under extensions),
|
||||
'pool' for the SGI pooled allocator or 'bitmap' for a bitmap allocator.
|
||||
This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-cheaders=OPTION</code></span></dt><dd><p>This allows the user to define the approach taken for C header
|
||||
compatibility with C++. Options are c, c_std, and c_global.
|
||||
These correspond to the source directory's include/c,
|
||||
include/c_std, and include/c_global, and may also include
|
||||
include/c_compatibility. The default is c_global.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-threads</code></span></dt><dd><p>This is an abbreviated form of <code class="code">'--enable-threads=yes'</code>
|
||||
(described next). This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-threads=OPTION</code></span></dt><dd><p>Select a threading library. A full description is given in the
|
||||
general <a class="ulink" href="http://gcc.gnu.org/install/configure.html" target="_top">compiler
|
||||
configuration instructions</a>.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-debug</code></span></dt><dd><p>Build separate debug libraries in addition to what is normally built.
|
||||
By default, the debug libraries are compiled with
|
||||
<code class="code"> CXXFLAGS='-g3 -O0'</code>
|
||||
, are installed in <code class="code">${libdir}/debug</code>, and have the
|
||||
same names and versioning information as the non-debug
|
||||
libraries. This option is off by default.
|
||||
</p><p>Note this make command, executed in
|
||||
the build directory, will do much the same thing, without the
|
||||
configuration difference and without building everything twice:
|
||||
<code class="code">make CXXFLAGS='-g3 -O0' all</code>
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-debug-flags=FLAGS</code></span></dt><dd><p>This option is only valid when <code class="code"> --enable-debug </code>
|
||||
is also specified, and applies to the debug builds only. With
|
||||
this option, you can pass a specific string of flags to the
|
||||
compiler to use when building the debug versions of libstdc++.
|
||||
FLAGS is a quoted string of options, like
|
||||
</p><pre class="programlisting">
|
||||
--enable-libstdcxx-debug-flags='-g3 -O1 -gdwarf-2'</pre></dd><dt><span class="term"><code class="code">--enable-cxx-flags=FLAGS</code></span></dt><dd><p>With this option, you can pass a string of -f (functionality)
|
||||
flags to the compiler to use when building libstdc++. This
|
||||
option can change the library ABI. FLAGS is a quoted string of
|
||||
options, like
|
||||
</p><pre class="programlisting">
|
||||
--enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</pre><p>
|
||||
Note that the flags don't necessarily have to all be -f flags,
|
||||
as shown, but usually those are the ones that will make sense
|
||||
for experimentation and configure-time overriding.
|
||||
</p><p>The advantage of --enable-cxx-flags over setting CXXFLAGS in
|
||||
the 'make' environment is that, if files are automatically
|
||||
rebuilt, the same flags will be used when compiling those files
|
||||
as well, so that everything matches.
|
||||
</p><p>Fun flags to try might include combinations of
|
||||
</p><pre class="programlisting">
|
||||
-fstrict-aliasing
|
||||
-fno-exceptions
|
||||
-ffunction-sections
|
||||
-fvtable-gc</pre><p>and opposite forms (-fno-) of the same. Tell us (the libstdc++
|
||||
mailing list) if you discover more!
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-c99</code></span></dt><dd><p>The "long long" type was introduced in C99, along
|
||||
with many other functions for wide characters, and math
|
||||
classification macros, etc. If enabled, all C99 functions not
|
||||
specified by the C++ standard will be put into <code class="code">namespace
|
||||
__gnu_cxx</code>, and then all these names will
|
||||
be injected into namespace std, so that C99 functions can be
|
||||
used "as if" they were in the C++ standard (as they
|
||||
will eventually be in some future revision of the standard,
|
||||
without a doubt). By default, C99 support is on, assuming the
|
||||
configure probes find all the necessary functions and bits
|
||||
necessary. This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-wchar_t</code>[default]</span></dt><dd><p>Template specializations for the "wchar_t" type are
|
||||
required for wide character conversion support. Disabling
|
||||
wide character specializations may be expedient for initial
|
||||
porting efforts, but builds only a subset of what is required by
|
||||
ISO, and is not recommended. By default, this option is on.
|
||||
This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-long-long </code></span></dt><dd><p>The "long long" type was introduced in C99. It is
|
||||
provided as a GNU extension to C++98 in g++. This flag builds
|
||||
support for "long long" into the library (specialized
|
||||
templates and the like for iostreams). This option is on by default:
|
||||
if enabled, users will have to either use the new-style "C"
|
||||
headers by default (i.e., <cmath> not <math.h>)
|
||||
or add appropriate compile-time flags to all compile lines to
|
||||
allow "C" visibility of this feature (on GNU/Linux,
|
||||
the flag is -D_ISOC99_SOURCE, which is added automatically via
|
||||
CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE).
|
||||
This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-fully-dynamic-string</code></span></dt><dd><p>This option enables a special version of basic_string avoiding
|
||||
the optimization that allocates empty objects in static memory.
|
||||
Mostly useful together with shared memory allocators, see PR
|
||||
libstdc++/16612 for details.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-concept-checks</code></span></dt><dd><p>This turns on additional compile-time checks for instantiated
|
||||
library templates, in the form of specialized templates,
|
||||
<a class="ulink" href="19_diagnostics/howto.html#3" target="_top">described here</a>. They
|
||||
can help users discover when they break the rules of the STL, before
|
||||
their programs run.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-symvers[=style]</code></span></dt><dd><p>In 3.1 and later, tries to turn on symbol versioning in the
|
||||
shared library (if a shared library has been
|
||||
requested). Values for 'style' that are currently supported
|
||||
are 'gnu', 'gnu-versioned-namespace', 'darwin', and
|
||||
'darwin-export'. Both gnu- options require that a recent
|
||||
version of the GNU linker be in use. Both darwin options are
|
||||
equivalent. With no style given, the configure script will try
|
||||
to guess correct defaults for the host system, probe to see if
|
||||
additional requirements are necessary and present for
|
||||
activation, and if so, will turn symbol versioning on. This
|
||||
option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-visibility</code></span></dt><dd><p> In 4.2 and later, enables or disables visibility attributes.
|
||||
If enabled (as by default), and the compiler seems capable of
|
||||
passing the simple sanity checks thrown at it, adjusts items
|
||||
in namespace std, namespace std::tr1, and namespace __gnu_cxx
|
||||
so that -fvisibility options work.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-pch</code></span></dt><dd><p>In 3.4 and later, tries to turn on the generation of
|
||||
stdc++.h.gch, a pre-compiled file including all the standard
|
||||
C++ includes. If enabled (as by default), and the compiler
|
||||
seems capable of passing the simple sanity checks thrown at
|
||||
it, try to build stdc++.h.gch as part of the make process.
|
||||
In addition, this generated file is used later on (by appending <code class="code">
|
||||
--include bits/stdc++.h </code> to CXXFLAGS) when running the
|
||||
testsuite.
|
||||
</p></dd><dt><span class="term"><code class="code">--disable-hosted-libstdcxx</code></span></dt><dd><p>
|
||||
By default, a complete <span class="emphasis"><em>hosted</em></span> C++ library is
|
||||
built. The C++ Standard also describes a
|
||||
<span class="emphasis"><em>freestanding</em></span> environment, in which only a
|
||||
minimal set of headers are provided. This option builds such an
|
||||
environment.
|
||||
</p></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch01s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="intro.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="build.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Bugs </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Build</td></tr></table></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 2. Setup</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I. Introduction" /><link rel="prev" href="bk01pt01ch01s03.html" title="Bugs" /><link rel="next" href="configure.html" title="Configure" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Setup</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch01s03.html">Prev</a> </td><th width="60%" align="center">Part I. Introduction</th><td width="20%" align="right"> <a accesskey="n" href="configure.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.setup"></a>Chapter 2. Setup</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch02s03.html">Make</a></span></dt><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></div><p>To transform libstdc++ sources into installed include files
|
||||
and properly built binaries useful for linking to other software is
|
||||
a multi-step process. Steps include getting the sources,
|
||||
configuring and building the sources, testing, and installation.
|
||||
</p><p>The general outline of commands is something like:
|
||||
</p><pre class="programlisting">
|
||||
<span class="emphasis"><em>get gcc sources</em></span>
|
||||
<span class="emphasis"><em>extract into gccsrcdir</em></span>
|
||||
mkdir <span class="emphasis"><em>gccbuilddir</em></span>
|
||||
cd <span class="emphasis"><em>gccbuilddir</em></span>
|
||||
<span class="emphasis"><em>gccsrcdir</em></span>/configure --prefix=<span class="emphasis"><em>destdir</em></span> --other-opts...
|
||||
make
|
||||
make check
|
||||
make install
|
||||
</pre><p>
|
||||
Each step is described in more detail in the following sections.
|
||||
</p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.prereq"></a>Prerequisites</h2></div></div></div><p>
|
||||
Because libstdc++ is part of GCC, the primary source for
|
||||
installation instructions is
|
||||
<a class="ulink" href="http://gcc.gnu.org/install/" target="_top">the GCC install page</a>.
|
||||
In particular, list of prerequisite software needed to build the library
|
||||
<a class="ulink" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">
|
||||
starts with those requirements.</a> The same pages also list
|
||||
the tools you will need if you wish to modify the source.
|
||||
</p><p>
|
||||
Additional data is given here only where it applies to libstdc++.
|
||||
</p><p>As of GCC 4.0.1 the minimum version of binutils required to build
|
||||
libstdc++ is <code class="code">2.15.90.0.1.1</code>. You can get snapshots
|
||||
(as well as releases) of binutils from
|
||||
<a class="ulink" href="ftp://sources.redhat.com/pub/binutils" target="_top">
|
||||
ftp://sources.redhat.com/pub/binutils</a>.
|
||||
Older releases of libstdc++ do not require such a recent version,
|
||||
but to take full advantage of useful space-saving features and
|
||||
bug-fixes you should use a recent binutils whenever possible.
|
||||
The configure process will automatically detect and use these
|
||||
features if the underlying support is present.
|
||||
</p><p>
|
||||
Finally, a few system-specific requirements:
|
||||
</p><div class="variablelist"><dl><dt><span class="term">linux</span></dt><dd><p>
|
||||
If gcc 3.1.0 or later on is being used on linux, an attempt
|
||||
will be made to use "C" library functionality necessary for
|
||||
C++ named locale support. For gcc 3.2.1 and later, this
|
||||
means that glibc 2.2.5 or later is required and the "C"
|
||||
library de_DE locale information must be installed.
|
||||
</p><p>
|
||||
Note however that the sanity checks involving the de_DE
|
||||
locale are skipped when an explicit --enable-clocale=gnu
|
||||
configure option is used: only the basic checks are carried
|
||||
out, defending against misconfigurations.
|
||||
</p><p>
|
||||
If the 'gnu' locale model is being used, the following
|
||||
locales are used and tested in the libstdc++ testsuites.
|
||||
The first column is the name of the locale, the second is
|
||||
the character set it is expected to use.
|
||||
</p><pre class="programlisting">
|
||||
de_DE ISO-8859-1
|
||||
de_DE@euro ISO-8859-15
|
||||
en_HK ISO-8859-1
|
||||
en_PH ISO-8859-1
|
||||
en_US ISO-8859-1
|
||||
en_US.ISO-8859-1 ISO-8859-1
|
||||
en_US.ISO-8859-15 ISO-8859-15
|
||||
en_US.UTF-8 UTF-8
|
||||
es_ES ISO-8859-1
|
||||
es_MX ISO-8859-1
|
||||
fr_FR ISO-8859-1
|
||||
fr_FR@euro ISO-8859-15
|
||||
is_IS UTF-8
|
||||
it_IT ISO-8859-1
|
||||
ja_JP.eucjp EUC-JP
|
||||
se_NO.UTF-8 UTF-8
|
||||
ta_IN UTF-8
|
||||
zh_TW BIG5
|
||||
</pre><p>Failure to have the underlying "C" library locale
|
||||
information installed will mean that C++ named locales for the
|
||||
above regions will not work: because of this, the libstdc++
|
||||
testsuite will skip the named locale tests. If this isn't an
|
||||
issue, don't worry about it. If named locales are needed, the
|
||||
underlying locale information must be installed. Note that
|
||||
rebuilding libstdc++ after the "C" locales are installed is not
|
||||
necessary.
|
||||
</p><p>
|
||||
To install support for locales, do only one of the following:
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p>install all locales</p><div class="itemizedlist"><ul type="circle"><li><p>with RedHat Linux:
|
||||
</p><p> <code class="code"> export LC_ALL=C </code>
|
||||
</p><p> <code class="code"> rpm -e glibc-common --nodeps </code>
|
||||
</p><p>
|
||||
<code class="code"> rpm -i --define "_install_langs all"
|
||||
glibc-common-2.2.5-34.i386.rpm
|
||||
</code>
|
||||
</p></li><li><p>
|
||||
Instructions for other operating systems solicited.
|
||||
</p></li></ul></div></li><li><p>install just the necessary locales</p><div class="itemizedlist"><ul type="circle"><li><p>with Debian Linux:</p><p> Add the above list, as shown, to the file
|
||||
<code class="code">/etc/locale.gen</code> </p><p> run <code class="code">/usr/sbin/locale-gen</code> </p></li><li><p>on most Unix-like operating systems:</p><p><code class="code"> localedef -i de_DE -f ISO-8859-1 de_DE </code></p><p>(repeat for each entry in the above list) </p></li><li><p>
|
||||
Instructions for other operating systems solicited.
|
||||
</p></li></ul></div></li></ul></div></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch01s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="intro.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="configure.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Bugs </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Configure</td></tr></table></div></body></html>
|
||||
|
9
libstdc++-v3/doc/html/manual/bk01pt01ch02s03.html
Normal file
9
libstdc++-v3/doc/html/manual/bk01pt01ch02s03.html
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Make</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="configure.html" title="Configure" /><link rel="next" href="test.html" title="Test" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Make</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="configure.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="test.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.make"></a>Make</h2></div></div></div><p>If you have never done this before, you should read the basic
|
||||
<a class="ulink" href="http://gcc.gnu.org/install/" target="_top">GCC Installation
|
||||
Instructions</a> first. Read <span class="emphasis"><em>all of them</em></span>.
|
||||
<span class="emphasis"><em>Twice.</em></span>
|
||||
</p><p>Then type:<span class="command"><strong>make</strong></span>, and congratulations, you're
|
||||
started to build.
|
||||
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="configure.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt01ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="test.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Configure </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Test</td></tr></table></div></body></html>
|
File diff suppressed because one or more lines are too long
@ -22,7 +22,7 @@
|
||||
listed.</p><p>“<span class="quote">Configurable</span>” (or “<span class="quote">Not configurable</span>”) means
|
||||
that the symbol is initially chosen (or not) based on
|
||||
--enable/--disable options at library build and configure time
|
||||
(documented <a class="link" href="bk01pt01ch02.html#manual.intro.setup.configure" title="Configure">here</a>), with the
|
||||
(documented <a class="link" href="configure.html" title="Configure">here</a>), with the
|
||||
various --enable/--disable choices being translated to
|
||||
#define/#undef).
|
||||
</p><p> <acronym class="acronym">ABI</acronym> means that changing from the default value may
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="support.html" title="Part II. Support" /><link rel="next" href="bk01pt02ch04.html" title="Chapter 4. Types" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="support.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch04.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id450521"></a></h2></div></div></div><p>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="support.html" title="Part II. Support" /><link rel="next" href="bk01pt02ch04.html" title="Chapter 4. Types" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="support.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch04.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id483158"></a></h2></div></div></div><p>
|
||||
This part deals with the functions called and objects created
|
||||
automatically during the course of a program's existence.
|
||||
</p><p>
|
||||
|
@ -90,7 +90,7 @@
|
||||
or loading and unloading shared objects in memory. As such, using
|
||||
caching allocators on systems that do not support
|
||||
<code class="function">abi::__cxa_atexit</code> is not recommended.
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id388518"></a>Interface Design</h4></div></div></div><p>
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id493543"></a>Interface Design</h4></div></div></div><p>
|
||||
The only allocator interface that
|
||||
is support is the standard C++ interface. As such, all STL
|
||||
containers have been adjusted, and all external allocators have
|
||||
@ -103,7 +103,7 @@
|
||||
</p><p>
|
||||
The base class that <code class="classname">allocator</code> is derived from
|
||||
may not be user-configurable.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id449357"></a>Selecting Default Allocation Policy</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id565976"></a>Selecting Default Allocation Policy</h4></div></div></div><p>
|
||||
It's difficult to pick an allocation strategy that will provide
|
||||
maximum utility, without excessively penalizing some behavior. In
|
||||
fact, it's difficult just deciding which typical actions to measure
|
||||
@ -140,7 +140,7 @@
|
||||
The current default choice for
|
||||
<code class="classname">allocator</code> is
|
||||
<code class="classname">__gnu_cxx::new_allocator</code>.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id385486"></a>Disabling Memory Caching</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id506394"></a>Disabling Memory Caching</h4></div></div></div><p>
|
||||
In use, <code class="classname">allocator</code> may allocate and
|
||||
deallocate using implementation-specified strategies and
|
||||
heuristics. Because of this, every call to an allocator object's
|
||||
@ -305,11 +305,11 @@
|
||||
A high-performance allocator that uses a bit-map to keep track
|
||||
of the used and unused memory locations. It has its own
|
||||
documentation, found <a class="link" href="bitmap_allocator.html" title="bitmap_allocator">here</a>.
|
||||
</p></li></ol></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id336934"></a><p><span class="title"><i>
|
||||
</p></li></ol></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id475582"></a><p><span class="title"><i>
|
||||
ISO/IEC 14882:1998 Programming languages - C++
|
||||
</i>. </span>
|
||||
isoc++_1998
|
||||
<span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="id336949"></a><p><span class="title"><i>The Standard Librarian: What Are Allocators Good
|
||||
<span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="id491290"></a><p><span class="title"><i>The Standard Librarian: What Are Allocators Good
|
||||
</i>. </span>
|
||||
austernm
|
||||
<span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername">
|
||||
@ -317,28 +317,28 @@
|
||||
. </span></span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.cuj.com/documents/s=8000/cujcexp1812austern/" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id402117"></a><p><span class="title"><i>The Hoard Memory Allocator</i>. </span>
|
||||
. </span></p></div><div class="biblioentry"><a id="id480225"></a><p><span class="title"><i>The Hoard Memory Allocator</i>. </span>
|
||||
emeryb
|
||||
<span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.cs.umass.edu/~emery/hoard/" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id386707"></a><p><span class="title"><i>Reconsidering Custom Memory Allocation</i>. </span>
|
||||
. </span></p></div><div class="biblioentry"><a id="id482598"></a><p><span class="title"><i>Reconsidering Custom Memory Allocation</i>. </span>
|
||||
bergerzorn
|
||||
<span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="author"><span class="firstname">Ben</span> <span class="surname">Zorn</span>. </span><span class="author"><span class="firstname">Kathryn</span> <span class="surname">McKinley</span>. </span><span class="copyright">Copyright © 2002 OOPSLA. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id404915"></a><p><span class="title"><i>Allocator Types</i>. </span>
|
||||
. </span></p></div><div class="biblioentry"><a id="id502321"></a><p><span class="title"><i>Allocator Types</i>. </span>
|
||||
kreftlanger
|
||||
<span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="publisher"><span class="publishername">
|
||||
C/C++ Users Journal
|
||||
. </span></span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.langer.camelot.de/Articles/C++Report/Allocators/Allocators.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id378638"></a><p><span class="title"><i>The C++ Programming Language</i>. </span>
|
||||
. </span></p></div><div class="biblioentry"><a id="id483616"></a><p><span class="title"><i>The C++ Programming Language</i>. </span>
|
||||
tcpl
|
||||
<span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 . </span><span class="pagenums">19.4 Allocators. </span><span class="publisher"><span class="publishername">
|
||||
Addison Wesley
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id401191"></a><p><span class="title"><i>Yalloc: A Recycling C++ Allocator</i>. </span>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id491902"></a><p><span class="title"><i>Yalloc: A Recycling C++ Allocator</i>. </span>
|
||||
yenf
|
||||
<span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span><span class="copyright">Copyright © . </span><span class="biblioid">
|
||||
<a class="ulink" href="http://home.earthlink.net/~brimar/yalloc/" target="_top">
|
||||
|
@ -395,25 +395,25 @@ global locale" (emphasis Paolo), that is:
|
||||
What should non-required facet instantiations do? If the
|
||||
generic implementation is provided, then how to end-users
|
||||
provide specializations?
|
||||
</p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id431371"></a><p><span class="title"><i>
|
||||
</p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id476919"></a><p><span class="title"><i>
|
||||
The GNU C Library
|
||||
</i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id446999"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id557982"></a><p><span class="title"><i>
|
||||
Correspondence
|
||||
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id376809"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id472314"></a><p><span class="title"><i>
|
||||
ISO/IEC 14882:1998 Programming languages - C++
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id376828"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id472332"></a><p><span class="title"><i>
|
||||
ISO/IEC 9899:1999 Programming languages - C
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id401235"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id478654"></a><p><span class="title"><i>
|
||||
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
|
||||
</i>. </span><span class="copyright">Copyright © 1999
|
||||
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id398149"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id478681"></a><p><span class="title"><i>
|
||||
The C++ Programming Language, Special Edition
|
||||
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
|
||||
Addison Wesley
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id426390"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id561217"></a><p><span class="title"><i>
|
||||
Standard C++ IOStreams and Locales
|
||||
</i>. </span><span class="subtitle">
|
||||
Advanced Programmer's Guide and Reference
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 15. Facets aka Categories</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="localization.html" title="Part VI. Localization" /><link rel="prev" href="bk01pt06ch14.html" title="Chapter 14. Locales" /><link rel="next" href="codecvt.html" title="codecvt" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 15. Facets aka Categories</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt06ch14.html">Prev</a> </td><th width="60%" align="center">Part VI. Localization</th><td width="20%" align="right"> <a accesskey="n" href="codecvt.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.localization.facet"></a>Chapter 15. Facets aka Categories</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.ctype"></a>ctype</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id373746"></a>Specializations</h4></div></div></div><p>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 15. Facets aka Categories</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="localization.html" title="Part VI. Localization" /><link rel="prev" href="bk01pt06ch14.html" title="Chapter 14. Locales" /><link rel="next" href="codecvt.html" title="codecvt" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 15. Facets aka Categories</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt06ch14.html">Prev</a> </td><th width="60%" align="center">Part VI. Localization</th><td width="20%" align="right"> <a accesskey="n" href="codecvt.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.localization.facet"></a>Chapter 15. Facets aka Categories</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.ctype"></a>ctype</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id468579"></a>Specializations</h4></div></div></div><p>
|
||||
For the required specialization codecvt<wchar_t, char, mbstate_t> ,
|
||||
conversions are made between the internal character set (always UCS4
|
||||
on GNU/Linux) and whatever the currently selected locale for the
|
||||
@ -47,25 +47,25 @@ characters.
|
||||
</p></li><li><p>
|
||||
Rename abstract base class. See if just smash-overriding is a
|
||||
better approach. Clarify, add sanity to naming.
|
||||
</p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id382630"></a><p><span class="title"><i>
|
||||
</p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id481489"></a><p><span class="title"><i>
|
||||
The GNU C Library
|
||||
</i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id336899"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id482684"></a><p><span class="title"><i>
|
||||
Correspondence
|
||||
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id433304"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id541901"></a><p><span class="title"><i>
|
||||
ISO/IEC 14882:1998 Programming languages - C++
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id433322"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id541920"></a><p><span class="title"><i>
|
||||
ISO/IEC 9899:1999 Programming languages - C
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id428978"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id477212"></a><p><span class="title"><i>
|
||||
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
|
||||
</i>. </span><span class="copyright">Copyright © 1999
|
||||
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id429006"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id477238"></a><p><span class="title"><i>
|
||||
The C++ Programming Language, Special Edition
|
||||
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
|
||||
Addison Wesley
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id380310"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id546249"></a><p><span class="title"><i>
|
||||
Standard C++ IOStreams and Locales
|
||||
</i>. </span><span class="subtitle">
|
||||
Advanced Programmer's Guide and Reference
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library , algorithm " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="algorithms.html" title="Part IX. Algorithms" /><link rel="prev" href="algorithms.html" title="Part IX. Algorithms" /><link rel="next" href="bk01pt09ch20.html" title="Chapter 20. Mutating" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="algorithms.html">Prev</a> </td><th width="60%" align="center">Part IX. Algorithms</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09ch20.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id457861"></a></h2></div></div></div><p>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library , algorithm " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="algorithms.html" title="Part IX. Algorithms" /><link rel="prev" href="algorithms.html" title="Part IX. Algorithms" /><link rel="next" href="bk01pt09ch20.html" title="Chapter 20. Mutating" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="algorithms.html">Prev</a> </td><th width="60%" align="center">Part IX. Algorithms</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09ch20.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id541597"></a></h2></div></div></div><p>
|
||||
The neatest accomplishment of the algorithms chapter is that all the
|
||||
work is done via iterators, not containers directly. This means two
|
||||
important things:
|
||||
|
@ -19,6 +19,6 @@
|
||||
mode or with debug mode. The
|
||||
following table provides the names and headers of the debugging
|
||||
containers:
|
||||
</p><div class="table"><a id="id449953"></a><p class="title"><b>Table 30.1. Debugging Containers</b></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /><col /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><code class="classname">std::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="classname">__gnu_debug::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::deque</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="classname">__gnu_debug::deque</code></td><td align="left"><code class="filename">deque</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::list</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="classname">__gnu_debug::list</code></td><td align="left"><code class="filename">list</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::map</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::map</code></td><td align="left"><code class="filename">map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::multimap</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::multimap</code></td><td align="left"><code class="filename">map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::multiset</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::multiset</code></td><td align="left"><code class="filename">set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::set</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::set</code></td><td align="left"><code class="filename">set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::string</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::wstring</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::wstring</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::basic_string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::basic_string</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::vector</code></td><td align="left"><code class="filename">vector</code></td><td align="left"><code class="classname">__gnu_debug::vector</code></td><td align="left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>In addition, when compiling in C++0x mode, these additional
|
||||
</p><div class="table"><a id="id479508"></a><p class="title"><b>Table 30.1. Debugging Containers</b></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /><col /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><code class="classname">std::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="classname">__gnu_debug::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::deque</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="classname">__gnu_debug::deque</code></td><td align="left"><code class="filename">deque</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::list</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="classname">__gnu_debug::list</code></td><td align="left"><code class="filename">list</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::map</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::map</code></td><td align="left"><code class="filename">map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::multimap</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::multimap</code></td><td align="left"><code class="filename">map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::multiset</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::multiset</code></td><td align="left"><code class="filename">set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::set</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::set</code></td><td align="left"><code class="filename">set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::string</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::wstring</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::wstring</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::basic_string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::basic_string</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::vector</code></td><td align="left"><code class="filename">vector</code></td><td align="left"><code class="classname">__gnu_debug::vector</code></td><td align="left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>In addition, when compiling in C++0x mode, these additional
|
||||
containers have additional debug capability.
|
||||
</p><div class="table"><a id="id319073"></a><p class="title"><b>Table 30.2. Debugging Containers C++0x</b></p><div class="table-contents"><table summary="Debugging Containers C++0x" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /><col /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><code class="classname">std::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch30s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch30s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>
|
||||
</p><div class="table"><a id="id565812"></a><p class="title"><b>Table 30.2. Debugging Containers C++0x</b></p><div class="table-contents"><table summary="Debugging Containers C++0x" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /><col /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><code class="classname">std::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch30s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch30s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="extensions.html" title="Part XII. Extensions" /><link rel="next" href="bk01pt12ch29.html" title="Chapter 29. Compile Time Checks" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch29.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id337521"></a></h2></div></div></div><p>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="extensions.html" title="Part XII. Extensions" /><link rel="next" href="bk01pt12ch29.html" title="Chapter 29. Compile Time Checks" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch29.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id531065"></a></h2></div></div></div><p>
|
||||
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.
|
||||
|
@ -1,95 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Build</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , build " /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="next" href="test.html" title="Test" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Build</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch02.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="test.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.build"></a>Build</h2></div></div></div><p>
|
||||
Because libstdc++ is part of GCC, the primary source for
|
||||
installation instructions is
|
||||
<a class="ulink" href="http://gcc.gnu.org/install/" target="_top">the GCC install page</a>.
|
||||
Additional data is given here only where it applies to libstdc++.
|
||||
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build.prereq"></a>Prerequisites</h3></div></div></div><p>
|
||||
The list of software needed to build the library is kept with the
|
||||
rest of the compiler, at
|
||||
<a class="ulink" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">
|
||||
http://gcc.gnu.org/install/prerequisites.html</a>. The same page
|
||||
also lists the tools you will need if you wish to modify the source.
|
||||
</p><p>As of GCC 4.0.1 the minimum version of binutils required to build
|
||||
libstdc++ is <code class="code">2.15.90.0.1.1</code>. You can get snapshots
|
||||
(as well as releases) of binutils from
|
||||
<a class="ulink" href="ftp://sources.redhat.com/pub/binutils" target="_top">
|
||||
ftp://sources.redhat.com/pub/binutils</a>.
|
||||
Older releases of libstdc++ do not require such a recent version,
|
||||
but to take full advantage of useful space-saving features and
|
||||
bug-fixes you should use a recent binutils if possible.
|
||||
The configure process will automatically detect and use these
|
||||
features if the underlying support is present.
|
||||
</p><p>
|
||||
Finally, a few system-specific requirements:
|
||||
</p><div class="variablelist"><dl><dt><span class="term">linux</span></dt><dd><p>
|
||||
If gcc 3.1.0 or later on is being used on linux, an attempt
|
||||
will be made to use "C" library functionality necessary for
|
||||
C++ named locale support. For gcc 3.2.1 and later, this
|
||||
means that glibc 2.2.5 or later is required and the "C"
|
||||
library de_DE locale information must be installed.
|
||||
</p><p>
|
||||
Note however that the sanity checks involving the de_DE
|
||||
locale are skipped when an explicit --enable-clocale=gnu
|
||||
configure option is used: only the basic checks are carried
|
||||
out, defending against misconfigurations.
|
||||
</p><p>
|
||||
If the 'gnu' locale model is being used, the following
|
||||
locales are used and tested in the libstdc++ testsuites.
|
||||
The first column is the name of the locale, the second is
|
||||
the character set it is expected to use.
|
||||
</p><pre class="programlisting">
|
||||
de_DE ISO-8859-1
|
||||
de_DE@euro ISO-8859-15
|
||||
en_HK ISO-8859-1
|
||||
en_PH ISO-8859-1
|
||||
en_US ISO-8859-1
|
||||
en_US.ISO-8859-1 ISO-8859-1
|
||||
en_US.ISO-8859-15 ISO-8859-15
|
||||
en_US.UTF-8 UTF-8
|
||||
es_ES ISO-8859-1
|
||||
es_MX ISO-8859-1
|
||||
fr_FR ISO-8859-1
|
||||
fr_FR@euro ISO-8859-15
|
||||
is_IS UTF-8
|
||||
it_IT ISO-8859-1
|
||||
ja_JP.eucjp EUC-JP
|
||||
se_NO.UTF-8 UTF-8
|
||||
ta_IN UTF-8
|
||||
zh_TW BIG5
|
||||
</pre><p>Failure to have the underlying "C" library locale
|
||||
information installed will mean that C++ named locales for the
|
||||
above regions will not work: because of this, the libstdc++
|
||||
testsuite will skip the named locale tests. If this isn't an
|
||||
issue, don't worry about it. If named locales are needed, the
|
||||
underlying locale information must be installed. Note that
|
||||
rebuilding libstdc++ after the "C" locales are installed is not
|
||||
necessary.
|
||||
</p><p>
|
||||
To install support for locales, do only one of the following:
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p>install all locales</p><div class="itemizedlist"><ul type="circle"><li><p>with RedHat Linux:
|
||||
</p><p> <code class="code"> export LC_ALL=C </code>
|
||||
</p><p> <code class="code"> rpm -e glibc-common --nodeps </code>
|
||||
</p><p>
|
||||
<code class="code"> rpm -i --define "_install_langs all"
|
||||
glibc-common-2.2.5-34.i386.rpm
|
||||
</code>
|
||||
</p></li><li><p>
|
||||
Instructions for other operating systems solicited.
|
||||
</p></li></ul></div></li><li><p>install just the necessary locales</p><div class="itemizedlist"><ul type="circle"><li><p>with Debian Linux:</p><p> Add the above list, as shown, to the file
|
||||
<code class="code">/etc/locale.gen</code> </p><p> run <code class="code">/usr/sbin/locale-gen</code> </p></li><li><p>on most Unix-like operating systems:</p><p><code class="code"> localedef -i de_DE -f ISO-8859-1 de_DE </code></p><p>(repeat for each entry in the above list) </p></li><li><p>
|
||||
Instructions for other operating systems solicited.
|
||||
</p></li></ul></div></li></ul></div></dd></dl></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build.configure"></a>Make</h3></div></div></div><p>If you have never done this before, you should read the basic
|
||||
<a class="ulink" href="http://gcc.gnu.org/install/" target="_top">GCC Installation
|
||||
Instructions</a> first. Read <span class="emphasis"><em>all of them</em></span>.
|
||||
<span class="emphasis"><em>Twice.</em></span>
|
||||
</p><p>When building libstdc++ you'll have to configure
|
||||
the entire <span class="emphasis"><em>gccsrcdir</em></span> directory. The full list of libstdc++
|
||||
specific configuration options, not dependent on the specific compiler
|
||||
release being used, can be found <a class="ulink" href="configopts.html" target="_top">here</a>.
|
||||
</p><p>Consider possibly using --enable-languages=c++ to save time by only
|
||||
building the C++ language parts.
|
||||
</p><pre class="programlisting">
|
||||
cd <span class="emphasis"><em>gccbuilddir</em></span>
|
||||
<span class="emphasis"><em>gccsrcdir</em></span>/configure --prefix=<span class="emphasis"><em>destdir</em></span> --other-opts...</pre></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt01ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="test.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Setup </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Test</td></tr></table></div></body></html>
|
@ -337,41 +337,41 @@ codecvt usage.
|
||||
</p></li><li><p>
|
||||
wchar_t/char internal buffers and conversions between
|
||||
internal/external buffers?
|
||||
</p></li></ul></div></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id272734"></a><p><span class="title"><i>
|
||||
</p></li></ul></div></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id480720"></a><p><span class="title"><i>
|
||||
The GNU C Library
|
||||
</i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id399498"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id535649"></a><p><span class="title"><i>
|
||||
Correspondence
|
||||
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id442423"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id533973"></a><p><span class="title"><i>
|
||||
ISO/IEC 14882:1998 Programming languages - C++
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id438296"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id534707"></a><p><span class="title"><i>
|
||||
ISO/IEC 9899:1999 Programming languages - C
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id438314"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id534725"></a><p><span class="title"><i>
|
||||
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
|
||||
</i>. </span><span class="copyright">Copyright © 1999
|
||||
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id436032"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id506111"></a><p><span class="title"><i>
|
||||
The C++ Programming Language, Special Edition
|
||||
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
|
||||
Addison Wesley
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id400418"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id493170"></a><p><span class="title"><i>
|
||||
Standard C++ IOStreams and Locales
|
||||
</i>. </span><span class="subtitle">
|
||||
Advanced Programmer's Guide and Reference
|
||||
. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername">
|
||||
Addison Wesley Longman
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id402869"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id558306"></a><p><span class="title"><i>
|
||||
A brief description of Normative Addendum 1
|
||||
</i>. </span><span class="author"><span class="firstname">Clive</span> <span class="surname">Feather</span>. </span><span class="pagenums">Extended Character Sets. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.lysator.liu.se/c/na1.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id435221"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id478698"></a><p><span class="title"><i>
|
||||
The Unicode HOWTO
|
||||
</i>. </span><span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="ftp://ftp.ilog.fr/pub/Users/haible/utf8/Unicode-HOWTO.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id435248"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id478726"></a><p><span class="title"><i>
|
||||
UTF-8 and Unicode FAQ for Unix/Linux
|
||||
</i>. </span><span class="author"><span class="firstname">Markus</span> <span class="surname">Khun</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.cl.cam.ac.uk/~mgk25/unicode.html" target="_top">
|
||||
|
199
libstdc++-v3/doc/html/manual/configure.html
Normal file
199
libstdc++-v3/doc/html/manual/configure.html
Normal file
@ -0,0 +1,199 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Configure</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , configure , options " /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="next" href="bk01pt01ch02s03.html" title="Make" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Configure</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch02.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch02s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.configure"></a>Configure</h2></div></div></div><p>
|
||||
When configuring libstdc++, you'll have to configure the entire
|
||||
<span class="emphasis"><em>gccsrcdir</em></span> directory. Consider using the
|
||||
toplevel gcc configuration option
|
||||
<code class="literal">--enable-languages=c++</code>, which saves time by only
|
||||
building the C++ toolchain.
|
||||
</p><p>
|
||||
Here are all of the configure options specific to libstdc++. Keep
|
||||
in mind that
|
||||
|
||||
<a class="ulink" href="http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_node/autoconf_131.html#SEC131" target="_top">they
|
||||
all have opposite forms as well</a> (enable/disable and
|
||||
with/without). The defaults are for the <span class="emphasis"><em>current
|
||||
development sources</em></span>, which may be different than those
|
||||
for released versions.
|
||||
</p><p>The canonical way to find out the configure options that are
|
||||
available for a given set of libstdc++ sources is to go to the
|
||||
source directory and then type:<span class="command"><strong>./configure --help</strong></span>.
|
||||
</p><div class="variablelist"><dl><dt><span class="term"><code class="code">--enable-multilib</code>[default]</span></dt><dd><p>This is part of the generic multilib support for building cross
|
||||
compilers. As such, targets like "powerpc-elf" will have
|
||||
libstdc++ built many different ways: "-msoft-float"
|
||||
and not, etc. A different libstdc++ will be built for each of
|
||||
the different multilib versions. This option is on by default.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-sjlj-exceptions</code></span></dt><dd><p>Forces old, set-jump/long-jump exception handling model. If
|
||||
at all possible, the new, frame unwinding exception handling routines
|
||||
should be used instead, as they significantly reduce both
|
||||
runtime memory usage and executable size. This option can
|
||||
change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-version-specific-runtime-libs</code></span></dt><dd><p>Specify that run-time libraries should be installed in the
|
||||
compiler-specific subdirectory (i.e.,
|
||||
<code class="code">${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
|
||||
instead of <code class="code">${libdir}</code>. This option is useful if you
|
||||
intend to use several versions of gcc in parallel. In addition,
|
||||
libstdc++'s include files will be installed in
|
||||
<code class="code">${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>,
|
||||
unless you also specify
|
||||
<code class="literal">--with-gxx-include-dir=<code class="filename">dirname</code></code> during configuration.
|
||||
</p></dd><dt><span class="term"><code class="code">--with-gxx-include-dir=<include-files dir></code></span></dt><dd><p>Adds support for named libstdc++ include directory. For instance,
|
||||
the following puts all the libstdc++ headers into a directory
|
||||
called "2.97-20001008" instead of the usual
|
||||
"c++/(version)".
|
||||
</p><pre class="programlisting">
|
||||
--with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/2.97-20001008</pre></dd><dt><span class="term"><code class="code">--enable-cstdio</code></span></dt><dd><p>This is an abbreviated form of <code class="code">'--enable-cstdio=stdio'</code>
|
||||
(described next). This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-cstdio=OPTION</code></span></dt><dd><p>Select a target-specific I/O package. At the moment, the only
|
||||
choice is to use 'stdio', a generic "C" abstraction.
|
||||
The default is 'stdio'.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-clocale</code></span></dt><dd><p>This is an abbreviated form of <code class="code">'--enable-clocale=generic'</code>
|
||||
(described next). This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-clocale=OPTION</code></span></dt><dd><p>Select a target-specific underlying locale package. The
|
||||
choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix
|
||||
(IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets,
|
||||
'gnu' to specify a model based on functionality from the GNU C
|
||||
library (langinfo/iconv/gettext) (from <a class="ulink" href="http://sources.redhat.com/glibc/" target="_top">glibc</a>, the GNU C
|
||||
library), or 'generic' to use a generic "C"
|
||||
abstraction which consists of "C" locale info.
|
||||
</p><p>As part of the configuration process, the "C" library is
|
||||
probed both for sufficient vintage, and installed locale
|
||||
data. If either of these elements are not present, the C++
|
||||
locale model default to 'generic.' On glibc-based systems of
|
||||
version 2.2.5 and above with installed locale files, 'gnu' is
|
||||
automatically selected.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-allocator</code></span></dt><dd><p>This is an abbreviated form of
|
||||
<code class="code">'--enable-libstdcxx-allocator=auto'</code> (described
|
||||
next). This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-allocator=OPTION </code></span></dt><dd><p>Select a target-specific underlying std::allocator. The
|
||||
choices are 'new' to specify a wrapper for new, 'malloc' to
|
||||
specify a wrapper for malloc, 'mt' for a fixed power of two allocator,
|
||||
'pool' for the SGI pooled allocator or 'bitmap' for a bitmap allocator.
|
||||
This option can change the library ABI. See this page for more information on allocator
|
||||
<a class="link" href="bk01pt04ch11.html#allocator.ext" title="Extension Allocators">extensions</a>
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-cheaders=OPTION</code></span></dt><dd><p>This allows the user to define the approach taken for C header
|
||||
compatibility with C++. Options are c, c_std, and c_global.
|
||||
These correspond to the source directory's include/c,
|
||||
include/c_std, and include/c_global, and may also include
|
||||
include/c_compatibility. The default is c_global.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-threads</code></span></dt><dd><p>This is an abbreviated form of <code class="code">'--enable-threads=yes'</code>
|
||||
(described next). This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-threads=OPTION</code></span></dt><dd><p>Select a threading library. A full description is given in the
|
||||
general <a class="ulink" href="http://gcc.gnu.org/install/configure.html" target="_top">compiler
|
||||
configuration instructions</a>.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-debug</code></span></dt><dd><p>Build separate debug libraries in addition to what is normally built.
|
||||
By default, the debug libraries are compiled with
|
||||
<code class="code"> CXXFLAGS='-g3 -O0 -fno-inline'</code>
|
||||
, are installed in <code class="code">${libdir}/debug</code>, and have the
|
||||
same names and versioning information as the non-debug
|
||||
libraries. This option is off by default.
|
||||
</p><p>Note this make command, executed in
|
||||
the build directory, will do much the same thing, without the
|
||||
configuration difference and without building everything twice:
|
||||
<code class="code">make CXXFLAGS='-g3 -O0 -fno-inline' all</code>
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-debug-flags=FLAGS</code></span></dt><dd><p>This option is only valid when <code class="code"> --enable-debug </code>
|
||||
is also specified, and applies to the debug builds only. With
|
||||
this option, you can pass a specific string of flags to the
|
||||
compiler to use when building the debug versions of libstdc++.
|
||||
FLAGS is a quoted string of options, like
|
||||
</p><pre class="programlisting">
|
||||
--enable-libstdcxx-debug-flags='-g3 -O1 -fno-inline'</pre></dd><dt><span class="term"><code class="code">--enable-cxx-flags=FLAGS</code></span></dt><dd><p>With this option, you can pass a string of -f (functionality)
|
||||
flags to the compiler to use when building libstdc++. This
|
||||
option can change the library ABI. FLAGS is a quoted string of
|
||||
options, like
|
||||
</p><pre class="programlisting">
|
||||
--enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</pre><p>
|
||||
Note that the flags don't necessarily have to all be -f flags,
|
||||
as shown, but usually those are the ones that will make sense
|
||||
for experimentation and configure-time overriding.
|
||||
</p><p>The advantage of --enable-cxx-flags over setting CXXFLAGS in
|
||||
the 'make' environment is that, if files are automatically
|
||||
rebuilt, the same flags will be used when compiling those files
|
||||
as well, so that everything matches.
|
||||
</p><p>Fun flags to try might include combinations of
|
||||
</p><pre class="programlisting">
|
||||
-fstrict-aliasing
|
||||
-fno-exceptions
|
||||
-ffunction-sections
|
||||
-fvtable-gc</pre><p>and opposite forms (-fno-) of the same. Tell us (the libstdc++
|
||||
mailing list) if you discover more!
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-c99</code></span></dt><dd><p>The "long long" type was introduced in C99, along
|
||||
with many other functions for wide characters, and math
|
||||
classification macros, etc. If enabled, all C99 functions not
|
||||
specified by the C++ standard will be put into <code class="code">namespace
|
||||
__gnu_cxx</code>, and then all these names will
|
||||
be injected into namespace std, so that C99 functions can be
|
||||
used "as if" they were in the C++ standard (as they
|
||||
will eventually be in some future revision of the standard,
|
||||
without a doubt). By default, C99 support is on, assuming the
|
||||
configure probes find all the necessary functions and bits
|
||||
necessary. This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-wchar_t</code>[default]</span></dt><dd><p>Template specializations for the "wchar_t" type are
|
||||
required for wide character conversion support. Disabling
|
||||
wide character specializations may be expedient for initial
|
||||
porting efforts, but builds only a subset of what is required by
|
||||
ISO, and is not recommended. By default, this option is on.
|
||||
This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-long-long </code></span></dt><dd><p>The "long long" type was introduced in C99. It is
|
||||
provided as a GNU extension to C++98 in g++. This flag builds
|
||||
support for "long long" into the library (specialized
|
||||
templates and the like for iostreams). This option is on by default:
|
||||
if enabled, users will have to either use the new-style "C"
|
||||
headers by default (i.e., <cmath> not <math.h>)
|
||||
or add appropriate compile-time flags to all compile lines to
|
||||
allow "C" visibility of this feature (on GNU/Linux,
|
||||
the flag is -D_ISOC99_SOURCE, which is added automatically via
|
||||
CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE).
|
||||
This option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-fully-dynamic-string</code></span></dt><dd><p>This option enables a special version of basic_string avoiding
|
||||
the optimization that allocates empty objects in static memory.
|
||||
Mostly useful together with shared memory allocators, see PR
|
||||
libstdc++/16612 for details.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-concept-checks</code></span></dt><dd><p>This turns on additional compile-time checks for instantiated
|
||||
library templates, in the form of specialized templates,
|
||||
<a class="link" href="bk01pt03ch08.html" title="Chapter 8. Concept Checking">described here</a>. They
|
||||
can help users discover when they break the rules of the STL, before
|
||||
their programs run.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-symvers[=style]</code></span></dt><dd><p>In 3.1 and later, tries to turn on symbol versioning in the
|
||||
shared library (if a shared library has been
|
||||
requested). Values for 'style' that are currently supported
|
||||
are 'gnu', 'gnu-versioned-namespace', 'darwin', and
|
||||
'darwin-export'. Both gnu- options require that a recent
|
||||
version of the GNU linker be in use. Both darwin options are
|
||||
equivalent. With no style given, the configure script will try
|
||||
to guess correct defaults for the host system, probe to see if
|
||||
additional requirements are necessary and present for
|
||||
activation, and if so, will turn symbol versioning on. This
|
||||
option can change the library ABI.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-visibility</code></span></dt><dd><p> In 4.2 and later, enables or disables visibility attributes.
|
||||
If enabled (as by default), and the compiler seems capable of
|
||||
passing the simple sanity checks thrown at it, adjusts items
|
||||
in namespace std, namespace std::tr1, and namespace __gnu_cxx
|
||||
so that -fvisibility options work.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-pch</code></span></dt><dd><p>In 3.4 and later, tries to turn on the generation of
|
||||
stdc++.h.gch, a pre-compiled file including all the standard
|
||||
C++ includes. If enabled (as by default), and the compiler
|
||||
seems capable of passing the simple sanity checks thrown at
|
||||
it, try to build stdc++.h.gch as part of the make process.
|
||||
In addition, this generated file is used later on (by appending <code class="code">
|
||||
--include bits/stdc++.h </code> to CXXFLAGS) when running the
|
||||
testsuite.
|
||||
</p></dd><dt><span class="term"><code class="code">--disable-hosted-libstdcxx</code></span></dt><dd><p>
|
||||
By default, a complete <span class="emphasis"><em>hosted</em></span> C++ library is
|
||||
built. The C++ Standard also describes a
|
||||
<span class="emphasis"><em>freestanding</em></span> environment, in which only a
|
||||
minimal set of headers are provided. This option builds such an
|
||||
environment.
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-clock-gettime</code></span></dt><dd><p>This is an abbreviated form of
|
||||
<code class="code">'--enable-clock-gettime=yes'</code>(described next).
|
||||
</p></dd><dt><span class="term"><code class="code">--enable-clock-gettime=OPTION</code></span></dt><dd><p>Enables link-type checks for the availability of the
|
||||
clock_gettime clocks, used in [time.clock] of the current C++0x draft.
|
||||
The choice OPTION=yes checks for the availability of the monotonic and
|
||||
realtime clocks in libc and libposix4. In case of need the latter is
|
||||
also linked to libstdc++ as part of the build process. OPTION=rt
|
||||
also searches (and, in case, links) librt. Note that the latter
|
||||
is not always desirable because, in glibc, for example, in turn it
|
||||
triggers the linking of libpthread too, which activates locking,
|
||||
a large overhead for single-thread programs. OPTION=no skips the
|
||||
tests completely. The default is OPTION=no.
|
||||
</p></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt01ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt01ch02s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Setup </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Make</td></tr></table></div></body></html>
|
@ -11,19 +11,20 @@
|
||||
The default optimizations and debug flags for a libstdc++ build
|
||||
are <code class="code">-g -O2</code>. However, both debug and optimization
|
||||
flags can be varied to change debugging characteristics. For
|
||||
instance, turning off all optimization via the <code class="code">-g -O0</code>
|
||||
flag will disable inlining, so that stepping through all
|
||||
functions, including inlined constructors and destructors, is
|
||||
possible. In addition,
|
||||
<code class="code">-fno-eliminate-unused-debug-types</code> can be used when
|
||||
additional debug information, such as nested class info, is
|
||||
desired.
|
||||
instance, turning off all optimization via the <code class="code">-g -O0
|
||||
-fno-inline</code> flags will disable inlining and optimizations,
|
||||
and add debugging information, so that stepping through all functions,
|
||||
(including inlined constructors and destructors) is possible. In
|
||||
addition, <code class="code">-fno-eliminate-unused-debug-types</code> can be
|
||||
used when additional debug information, such as nested class info,
|
||||
is desired.
|
||||
</p><p>
|
||||
Or, the debug format that the compiler and debugger use to
|
||||
communicate information about source constructs can be changed via
|
||||
<code class="code"> -gdwarf-2 </code> or <code class="code"> -gstabs </code> flags: some
|
||||
debugging formats permit more expressive type and scope information
|
||||
to be shown in gdb. The default debug information for a particular
|
||||
<code class="code">-gdwarf-2</code> or <code class="code">-gstabs</code> flags: some debugging
|
||||
formats permit more expressive type and scope information to be
|
||||
shown in gdb. Expressiveness can be enhanced by flags like
|
||||
<code class="code">-g3</code>. The default debug information for a particular
|
||||
platform can be identified via the value set by the
|
||||
PREFERRED_DEBUGGING_TYPE macro in the gcc sources.
|
||||
</p><p>
|
||||
@ -43,15 +44,15 @@
|
||||
debug build will persist, without having to specify
|
||||
<code class="code">CXXFLAGS</code>, and the debug library will be installed in a
|
||||
separate directory tree, in <code class="code">(prefix)/lib/debug</code>. For
|
||||
more information, look at the <a class="ulink" href="configopts.html" target="_top">configuration options</a> document.
|
||||
more information, look at the <a class="link" href="configure.html" title="Configure">configuration</a> section.
|
||||
</p><p>
|
||||
A second approach is to use the configuration flags
|
||||
</p><pre class="programlisting">
|
||||
make CXXFLAGS='-g3 -O0' all
|
||||
make CXXFLAGS='-g3 -fno-inline -O0' all
|
||||
</pre><p>
|
||||
This quick and dirty approach is often sufficient for quick
|
||||
debugging tasks, when you cannot or don't want to recompile your
|
||||
application to use the <a class="ulink" href="#safe" target="_top">debug mode</a>.</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug.memory"></a>Memory Leak Hunting</h3></div></div></div><p>
|
||||
application to use the <a class="link" href="debug_mode.html" title="Chapter 30. Debug Mode">debug mode</a>.</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug.memory"></a>Memory Leak Hunting</h3></div></div></div><p>
|
||||
There are various third party memory tracing and debug utilities
|
||||
that can be used to provide detailed memory allocation information
|
||||
about C++ code. An exhaustive list of tools is not going to be
|
||||
@ -66,7 +67,7 @@
|
||||
thing of great importance to keep in mind when debugging C++ code
|
||||
that uses <code class="code">new</code> and <code class="code">delete</code>: there are
|
||||
different kinds of allocation schemes that can be used by <code class="code">
|
||||
std::allocator </code>. For implementation details, see the <a class="ulink" href="ext/mt_allocator.html" target="_top">mt allocator</a> documentation and
|
||||
std::allocator </code>. For implementation details, see the <a class="link" href="bk01pt12ch32.html#manual.ext.allocator.mt" title="mt_allocator">mt allocator</a> documentation and
|
||||
look specifically for <code class="code">GLIBCXX_FORCE_NEW</code>.
|
||||
</p><p>
|
||||
In a nutshell, the default allocator used by <code class="code">
|
||||
@ -122,7 +123,7 @@
|
||||
valgrind -v --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes a.out
|
||||
</pre></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug.gdb"></a>Using <span class="command"><strong>gdb</strong></span></h3></div></div></div><p>
|
||||
</p><p>
|
||||
Many options are available for gdb itself: please see <a class="ulink" href="http://sources.redhat.com/gdb/current/onlinedocs/gdb_13.html#SEC109" target="_top">
|
||||
Many options are available for gdb itself: please see <a class="ulink" href="http://sources.redhat.com/gdb/current/onlinedocs/gdb_13.html#SEC125" target="_top">
|
||||
"GDB features for C++" </a> in the gdb documentation. Also
|
||||
recommended: the other parts of this manual.
|
||||
</p><p>
|
||||
|
File diff suppressed because one or more lines are too long
@ -241,38 +241,38 @@ void test01()
|
||||
model. As of this writing, it is unknown how to query to see
|
||||
if a specified message catalog exists using the gettext
|
||||
package.
|
||||
</p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id435992"></a><p><span class="title"><i>
|
||||
</p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id491564"></a><p><span class="title"><i>
|
||||
The GNU C Library
|
||||
</i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling, and 7 Locales and Internationalization
|
||||
. </span></p></div><div class="biblioentry"><a id="id375623"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id558204"></a><p><span class="title"><i>
|
||||
Correspondence
|
||||
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id377133"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id539214"></a><p><span class="title"><i>
|
||||
ISO/IEC 14882:1998 Programming languages - C++
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id377151"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id539233"></a><p><span class="title"><i>
|
||||
ISO/IEC 9899:1999 Programming languages - C
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id430388"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id559064"></a><p><span class="title"><i>
|
||||
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
|
||||
</i>. </span><span class="copyright">Copyright © 1999
|
||||
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id430416"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id559090"></a><p><span class="title"><i>
|
||||
The C++ Programming Language, Special Edition
|
||||
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
|
||||
Addison Wesley
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id470349"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id483268"></a><p><span class="title"><i>
|
||||
Standard C++ IOStreams and Locales
|
||||
</i>. </span><span class="subtitle">
|
||||
Advanced Programmer's Guide and Reference
|
||||
. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername">
|
||||
Addison Wesley Longman
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id433912"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id483100"></a><p><span class="title"><i>
|
||||
Java 2 Platform, Standard Edition, v 1.3.1 API Specification
|
||||
</i>. </span><span class="pagenums">java.util.Properties, java.text.MessageFormat,
|
||||
java.util.Locale, java.util.ResourceBundle. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://java.sun.com/j2se/1.3/docs/api" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id433933"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id559805"></a><p><span class="title"><i>
|
||||
GNU gettext tools, version 0.10.38, Native Language Support
|
||||
Library and Tools.
|
||||
</i>. </span><span class="biblioid">
|
||||
|
@ -10,11 +10,11 @@ explicit source declaration or by compiling existing sources with a
|
||||
specific compiler flag.
|
||||
</p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.intro"></a>Intro</h2></div></div></div><p>The following library components in the include
|
||||
<code class="filename">numeric</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::accumulate</code></p></li><li><p><code class="function">std::adjacent_difference</code></p></li><li><p><code class="function">std::inner_product</code></p></li><li><p><code class="function">std::partial_sum</code></p></li></ul></div><p>The following library components in the include
|
||||
<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::adjacent_find</code></p></li><li><p><code class="function">std::count</code></p></li><li><p><code class="function">std::count_if</code></p></li><li><p><code class="function">std::equal</code></p></li><li><p><code class="function">std::find</code></p></li><li><p><code class="function">std::find_if</code></p></li><li><p><code class="function">std::find_first_of</code></p></li><li><p><code class="function">std::for_each</code></p></li><li><p><code class="function">std::generate</code></p></li><li><p><code class="function">std::generate_n</code></p></li><li><p><code class="function">std::lexicographical_compare</code></p></li><li><p><code class="function">std::mismatch</code></p></li><li><p><code class="function">std::search</code></p></li><li><p><code class="function">std::search_n</code></p></li><li><p><code class="function">std::transform</code></p></li><li><p><code class="function">std::replace</code></p></li><li><p><code class="function">std::replace_if</code></p></li><li><p><code class="function">std::max_element</code></p></li><li><p><code class="function">std::merge</code></p></li><li><p><code class="function">std::min_element</code></p></li><li><p><code class="function">std::nth_element</code></p></li><li><p><code class="function">std::partial_sort</code></p></li><li><p><code class="function">std::partition</code></p></li><li><p><code class="function">std::random_shuffle</code></p></li><li><p><code class="function">std::set_union</code></p></li><li><p><code class="function">std::set_intersection</code></p></li><li><p><code class="function">std::set_symmetric_difference</code></p></li><li><p><code class="function">std::set_difference</code></p></li><li><p><code class="function">std::sort</code></p></li><li><p><code class="function">std::stable_sort</code></p></li><li><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id470991"></a><p><span class="title"><i>
|
||||
<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::adjacent_find</code></p></li><li><p><code class="function">std::count</code></p></li><li><p><code class="function">std::count_if</code></p></li><li><p><code class="function">std::equal</code></p></li><li><p><code class="function">std::find</code></p></li><li><p><code class="function">std::find_if</code></p></li><li><p><code class="function">std::find_first_of</code></p></li><li><p><code class="function">std::for_each</code></p></li><li><p><code class="function">std::generate</code></p></li><li><p><code class="function">std::generate_n</code></p></li><li><p><code class="function">std::lexicographical_compare</code></p></li><li><p><code class="function">std::mismatch</code></p></li><li><p><code class="function">std::search</code></p></li><li><p><code class="function">std::search_n</code></p></li><li><p><code class="function">std::transform</code></p></li><li><p><code class="function">std::replace</code></p></li><li><p><code class="function">std::replace_if</code></p></li><li><p><code class="function">std::max_element</code></p></li><li><p><code class="function">std::merge</code></p></li><li><p><code class="function">std::min_element</code></p></li><li><p><code class="function">std::nth_element</code></p></li><li><p><code class="function">std::partial_sort</code></p></li><li><p><code class="function">std::partition</code></p></li><li><p><code class="function">std::random_shuffle</code></p></li><li><p><code class="function">std::set_union</code></p></li><li><p><code class="function">std::set_intersection</code></p></li><li><p><code class="function">std::set_symmetric_difference</code></p></li><li><p><code class="function">std::set_difference</code></p></li><li><p><code class="function">std::sort</code></p></li><li><p><code class="function">std::stable_sort</code></p></li><li><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id481250"></a><p><span class="title"><i>
|
||||
Parallelization of Bulk Operations for STL Dictionaries
|
||||
</i>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Leonor</span> <span class="surname">Frias</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername">
|
||||
Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS)
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id471037"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id502406"></a><p><span class="title"><i>
|
||||
The Multi-Core Standard Template Library
|
||||
</i>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Peter</span> <span class="surname">Sanders</span>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Putze</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername">
|
||||
Euro-Par 2007: Parallel Processing. (LNCS 4641)
|
||||
|
@ -29,7 +29,7 @@ drops to zero.
|
||||
Derived classes override those functions to destroy resources in a context
|
||||
where the correct dynamic type is known. This is an application of the
|
||||
technique known as type erasure.
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id399768"></a>Class Hierarchy</h4></div></div></div><p>
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id476828"></a>Class Hierarchy</h4></div></div></div><p>
|
||||
A <code class="classname">shared_ptr<T></code> contains a pointer of
|
||||
type <span class="type">T*</span> and an object of type
|
||||
<code class="classname">__shared_count</code>. The shared_count contains a
|
||||
@ -71,7 +71,7 @@ be forwarded to <span class="type">Tp</span>'s constructor.
|
||||
Unlike the other <code class="classname">_Sp_counted_*</code> classes, this one is parameterized on the
|
||||
type of object, not the type of pointer; this is purely a convenience
|
||||
that simplifies the implementation slightly.
|
||||
</p></dd></dl></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id438247"></a>Thread Safety</h4></div></div></div><p>
|
||||
</p></dd></dl></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id541894"></a>Thread Safety</h4></div></div></div><p>
|
||||
The interface of <code class="classname">tr1::shared_ptr</code> was extended for C++0x
|
||||
with support for rvalue-references and the other features from
|
||||
N2351. As with other libstdc++ headers shared by TR1 and C++0x,
|
||||
@ -129,7 +129,7 @@ compiler, standard library, platform etc. For the version of
|
||||
shared_ptr in libstdc++ the compiler and library are fixed, which
|
||||
makes things much simpler: we have an atomic CAS or we don't, see Lock
|
||||
Policy below for details.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id445836"></a>Selecting Lock Policy</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id510938"></a>Selecting Lock Policy</h4></div></div></div><p>
|
||||
</p><p>
|
||||
There is a single <code class="classname">_Sp_counted_base</code> class,
|
||||
which is a template parameterized on the enum
|
||||
@ -170,7 +170,7 @@ used when libstdc++ is built without <code class="literal">--enable-threads</cod
|
||||
<code class="filename">ext/atomicity.h</code>, which detect if the program
|
||||
is multi-threaded. If only one thread of execution exists in
|
||||
the program then less expensive non-atomic operations are used.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id390904"></a>Dual C++0x and TR1 Implementation</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id438058"></a>Dual C++0x and TR1 Implementation</h4></div></div></div><p>
|
||||
The classes derived from <code class="classname">_Sp_counted_base</code> (see Class Hierarchy
|
||||
below) and <code class="classname">__shared_count</code> are implemented separately for C++0x
|
||||
and TR1, in <code class="filename">bits/boost_sp_shared_count.h</code> and
|
||||
@ -181,7 +181,7 @@ The TR1 implementation is considered relatively stable, so is unlikely to
|
||||
change unless bug fixes require it. If the code that is common to both
|
||||
C++0x and TR1 modes needs to diverge further then it might be necessary to
|
||||
duplicate additional classes and only make changes to the C++0x versions.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id398449"></a>Related functions and classes</h4></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>,
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id483862"></a>Related functions and classes</h4></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>,
|
||||
<code class="code">const_pointer_cast</code></span></dt><dd><p>
|
||||
As noted in N2351, these functions can be implemented non-intrusively using
|
||||
the alias constructor. However the aliasing constructor is only available
|
||||
@ -214,10 +214,10 @@ is called. Users should not try to use this.
|
||||
As well as the extra constructors, this implementation also needs some
|
||||
members of _Sp_counted_deleter to be protected where they could otherwise
|
||||
be private.
|
||||
</p></dd></dl></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.using"></a>Use</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id399153"></a>Examples</h4></div></div></div><p>
|
||||
</p></dd></dl></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.using"></a>Use</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id467181"></a>Examples</h4></div></div></div><p>
|
||||
Examples of use can be found in the testsuite, under
|
||||
<code class="filename">testsuite/tr1/2_general_utilities/shared_ptr</code>.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id440522"></a>Unresolved Issues</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id467197"></a>Unresolved Issues</h4></div></div></div><p>
|
||||
The resolution to C++ Standard Library issue <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674" target="_top">674</a>,
|
||||
"shared_ptr interface changes for consistency with N1856" will
|
||||
need to be implemented after it is accepted into the working
|
||||
@ -265,7 +265,7 @@ be private.
|
||||
code to work with, Peter Dimov in particular for his help and
|
||||
invaluable advice on thread safety. Phillip Jordan and Paolo
|
||||
Carlini for the lock policy implementation.
|
||||
</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id372846"></a><p>[<abbr class="abbrev">
|
||||
</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id530534"></a><p>[<abbr class="abbrev">
|
||||
n2351
|
||||
</abbr>] <span class="title"><i>
|
||||
Improving shared_ptr for C++0x, Revision 2
|
||||
@ -274,7 +274,7 @@ be private.
|
||||
. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id372870"></a><p>[<abbr class="abbrev">
|
||||
. </span></p></div><div class="biblioentry"><a id="id530558"></a><p>[<abbr class="abbrev">
|
||||
n2456
|
||||
</abbr>] <span class="title"><i>
|
||||
C++ Standard Library Active Issues List (Revision R52)
|
||||
@ -283,7 +283,7 @@ be private.
|
||||
. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2456.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id426703"></a><p>[<abbr class="abbrev">
|
||||
. </span></p></div><div class="biblioentry"><a id="id563958"></a><p>[<abbr class="abbrev">
|
||||
n2461
|
||||
</abbr>] <span class="title"><i>
|
||||
Working Draft, Standard for Programming Language C++
|
||||
@ -292,7 +292,7 @@ be private.
|
||||
. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id446795"></a><p>[<abbr class="abbrev">
|
||||
. </span></p></div><div class="biblioentry"><a id="id529558"></a><p>[<abbr class="abbrev">
|
||||
boostshared_ptr
|
||||
</abbr>] <span class="title"><i>
|
||||
Boost C++ Libraries documentation - shared_ptr class template
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Test</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , test , testsuite " /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="build.html" title="Build" /><link rel="next" href="using.html" title="Chapter 3. Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Test</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="build.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="using.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.test"></a>Test</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.organization"></a>Organization</h3></div></div></div><p>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Test</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content=" ISO C++ , test , testsuite , performance , conformance , ABI , exception safety " /><meta name="keywords" content=" ISO C++ , library " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="bk01pt01ch02s03.html" title="Make" /><link rel="next" href="using.html" title="Chapter 3. Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Test</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch02s03.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="using.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.test"></a>Test</h2></div></div></div><p>
|
||||
The libstdc++ testsuite includes testing for standard conformance,
|
||||
regressions, ABI, and performance.
|
||||
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.organization"></a>Organization</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.organization.layout"></a>Directory Layout</h4></div></div></div><p>
|
||||
The directory <span class="emphasis"><em>libsrcdir/testsuite</em></span> contains the
|
||||
individual test cases organized in sub-directories corresponding to
|
||||
chapters of the C++ standard (detailed below), the dejagnu test
|
||||
@ -69,7 +72,7 @@ util Files for libtestc++, utilities and testing routines.
|
||||
</pre><p>
|
||||
All new tests should be written with the policy of one test
|
||||
case, one file in mind.
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.naming"></a>Naming Conventions</h3></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.organization.naming"></a>Naming Conventions</h4></div></div></div><p>
|
||||
In addition, there are some special names and suffixes that are
|
||||
used within the testsuite to designate particular kinds of
|
||||
tests.
|
||||
@ -123,69 +126,7 @@ cat 27_io/objects/char/3_xin.in | a.out
|
||||
analyze runtime performance, for performance regression testing,
|
||||
or for other optimization related analysis. At the moment, these
|
||||
test cases are not run by default.
|
||||
</p></li></ul></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.utils"></a>Utilities</h3></div></div></div><p>
|
||||
</p><p>
|
||||
The testsuite directory also contains some files that implement
|
||||
functionality that is intended to make writing test cases easier,
|
||||
or to avoid duplication, or to provide error checking in a way that
|
||||
is consistent across platforms and test harnesses. A stand-alone
|
||||
executable, called <span class="emphasis"><em>abi_check</em></span>, and a static
|
||||
library called <span class="emphasis"><em>libtestc++</em></span> are
|
||||
constructed. Both of these items are not installed, and only used
|
||||
during testing.
|
||||
</p><p>
|
||||
These files include the following functionality:
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p>
|
||||
<span class="emphasis"><em>testsuite_abi.h</em></span>,
|
||||
<span class="emphasis"><em>testsuite_abi.cc</em></span>,
|
||||
<span class="emphasis"><em>testsuite_abi_check.cc</em></span>
|
||||
</p><p>
|
||||
Creates the executable <span class="emphasis"><em>abi_check</em></span>.
|
||||
Used to check correctness of symbol versioning, visibility of
|
||||
exported symbols, and compatibility on symbols in the shared
|
||||
library, for hosts that support this feature. More information
|
||||
can be found in the ABI documentation <a class="ulink" href="abi.html" target="_top">here</a>
|
||||
</p></li><li><p>
|
||||
<span class="emphasis"><em>testsuite_allocator.h</em></span>,
|
||||
<span class="emphasis"><em>testsuite_allocator.cc</em></span>
|
||||
</p><p>
|
||||
Contains specialized allocators that keep track of construction
|
||||
and destruction. Also, support for overriding global new and
|
||||
delete operators, including verification that new and delete
|
||||
are called during execution, and that allocation over max_size
|
||||
fails.
|
||||
</p></li><li><p>
|
||||
<span class="emphasis"><em>testsuite_character.h</em></span>
|
||||
</p><p>
|
||||
Contains <code class="code">std::char_traits</code> and
|
||||
<code class="code">std::codecvt</code> specializations for a user-defined
|
||||
POD.
|
||||
</p></li><li><p>
|
||||
<span class="emphasis"><em>testsuite_hooks.h</em></span>,
|
||||
<span class="emphasis"><em>testsuite_hooks.cc</em></span>
|
||||
</p><p>
|
||||
A large number of utilities, including:
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p>VERIFY</p></li><li><p>set_memory_limits</p></li><li><p>verify_demangle</p></li><li><p>run_tests_wrapped_locale</p></li><li><p>run_tests_wrapped_env</p></li><li><p>try_named_locale</p></li><li><p>try_mkfifo</p></li><li><p>func_callback</p></li><li><p>counter</p></li><li><p>copy_tracker</p></li><li><p>copy_constructor</p></li><li><p>assignment_operator</p></li><li><p>destructor</p></li><li><p>pod_char, pod_int and associated char_traits specializations</p></li></ul></div></li><li><p>
|
||||
<span class="emphasis"><em>testsuite_io.h</em></span>
|
||||
</p><p>
|
||||
Error, exception, and constraint checking for
|
||||
<code class="code">std::streambuf, std::basic_stringbuf, std::basic_filebuf</code>.
|
||||
</p></li><li><p>
|
||||
<span class="emphasis"><em>testsuite_iterators.h</em></span>
|
||||
</p><p>
|
||||
Wrappers for various iterators.
|
||||
</p></li><li><p>
|
||||
<span class="emphasis"><em>testsuite_performance.h</em></span>
|
||||
</p><p>
|
||||
A number of class abstractions for performance counters, and
|
||||
reporting functions including:
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p>time_counter</p></li><li><p>resource_counter</p></li><li><p>report_performance</p></li></ul></div></li></ul></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.run"></a>Running the Testsuite</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.run.basic"></a>Basic Results</h4></div></div></div><p>
|
||||
There are several options for running tests, including testing
|
||||
the regression tests, testing a subset of the regression tests,
|
||||
testing the performance tests, testing just compilation, testing
|
||||
installed tools, etc. In addition, there is a special rule for
|
||||
checking the exported symbols of the shared library.
|
||||
</p><p>
|
||||
</p></li></ul></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.run"></a>Running the Testsuite</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.run.basic"></a>Basic</h4></div></div></div><p>
|
||||
You can check the status of the build without installing it
|
||||
using the dejagnu harness, much like the rest of the gcc
|
||||
tools.</p><pre class="programlisting"> make check</pre><p>in the <span class="emphasis"><em>libbuilddir</em></span> directory.</p><p>or</p><pre class="programlisting"> make check-target-libstdc++-v3</pre><p>in the <span class="emphasis"><em>gccbuilddir</em></span> directory.
|
||||
@ -200,12 +141,18 @@ cat 27_io/objects/char/3_xin.in | a.out
|
||||
output, and the executable output (if any).
|
||||
</p><p>
|
||||
Archives of test results for various versions and platforms are
|
||||
available on the GCC website in the <a class="ulink" href="http://gcc.gnu.org/gcc-4.1/buildstat.html" target="_top">build
|
||||
available on the GCC website in the <a class="ulink" href="http://gcc.gnu.org/gcc-4.3/buildstat.html" target="_top">build
|
||||
status</a> section of each individual release, and are also
|
||||
archived on a daily basis on the <a class="ulink" href="http://gcc.gnu.org/ml/gcc-testresults/current" target="_top">gcc-testresults</a>
|
||||
mailing list. Please check either of these places for a similar
|
||||
combination of source version, operating system, and host CPU.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.run.options"></a>Options</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.run.variations"></a>Variations</h4></div></div></div><p>
|
||||
There are several options for running tests, including testing
|
||||
the regression tests, testing a subset of the regression tests,
|
||||
testing the performance tests, testing just compilation, testing
|
||||
installed tools, etc. In addition, there is a special rule for
|
||||
checking the exported symbols of the shared library.
|
||||
</p><p>
|
||||
To debug the dejagnu test harness during runs, try invoking with a
|
||||
specific argument to the variable RUNTESTFLAGS, as below.
|
||||
</p><pre class="programlisting">
|
||||
@ -325,7 +272,7 @@ runtest --tool libstdc++ --srcdir=/path/to/gcc/libstdc++-v3/testsuite
|
||||
We are interested in any strange failures of the testsuite;
|
||||
please email the main libstdc++ mailing list if you see
|
||||
something odd or have questions.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.run.permutations"></a>Test Permutations</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.run.permutations"></a>Permutations</h4></div></div></div><p>
|
||||
To run the libstdc++ test suite under the <a class="link" href="debug_mode.html" title="Chapter 30. Debug Mode">debug mode</a>, edit
|
||||
<code class="filename">libstdc++-v3/scripts/testsuite_flags</code> to add the
|
||||
compile-time flag <code class="constant">-D_GLIBCXX_DEBUG</code> to the
|
||||
@ -336,10 +283,16 @@ runtest --tool libstdc++ --srcdir=/path/to/gcc/libstdc++-v3/testsuite
|
||||
precisely the same results under debug mode that it does under
|
||||
release mode: any deviation indicates an error in either the
|
||||
library or the test suite.
|
||||
</p><p>
|
||||
The <a class="link" href="parallel_mode.html" title="Chapter 31. Parallel Mode">parallel
|
||||
mode</a> can be tested in much the same manner, substituting
|
||||
<code class="constant">-D_GLIBCXX_PARALLEL</code> for
|
||||
<code class="constant">-D_GLIBCXX_DEBUG</code> in the previous paragraph.
|
||||
</p><p>
|
||||
Or, just run the testsuites with <code class="constant">CXXFLAGS</code>
|
||||
set to <code class="constant">-D_GLIBCXX_DEBUG</code>.
|
||||
</p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.new_tests"></a>New Test Cases</h3></div></div></div><p>
|
||||
set to <code class="constant">-D_GLIBCXX_DEBUG</code> or
|
||||
<code class="constant">-D_GLIBCXX_PARALLEL</code>.
|
||||
</p></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.new_tests"></a>Writing a new test case</h3></div></div></div><p>
|
||||
The first step in making a new test case is to choose the correct
|
||||
directory and file name, given the organization as previously
|
||||
described.
|
||||
@ -450,8 +403,10 @@ up in the normal.exp file.
|
||||
// { dg-options "-O0" { target *-*-* } }
|
||||
</pre><p>
|
||||
More examples can be found in the libstdc++-v3/testsuite/*/*.cc files.
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.dejagnu"></a>Test Harness Details</h3></div></div></div><p>
|
||||
Underlying details of testing are abstracted via the GNU Dejagnu package.
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.harness"></a>Test Harness and Utilities</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.harness.dejagnu"></a>Dejagnu Harness Details</h4></div></div></div><p>
|
||||
Underlying details of testing for conformance and regressions are
|
||||
abstracted via the GNU Dejagnu package. This is similar to the
|
||||
rest of GCC.
|
||||
</p><p>This is information for those looking at making changes to the testsuite
|
||||
structure, and/or needing to trace dejagnu's actions with --verbose. This
|
||||
will not be useful to people who are "merely" adding new tests to the existing
|
||||
@ -475,29 +430,60 @@ callbacks loaded from the support library.
|
||||
</p><p>The <code class="code">config</code> directory is searched for any particular "target
|
||||
board" information unique to this library. This is currently unused and sets
|
||||
only default variables.
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.future"></a>Future</h3></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.harness.utils"></a>Utilities</h4></div></div></div><p>
|
||||
</p><p>
|
||||
Shared runs need to be implemented, for targets that support shared libraries.
|
||||
</p><p>
|
||||
Diffing of expected output to standard streams needs to be finished off.
|
||||
</p><p>
|
||||
The V3 testing framework supports, or will eventually support,
|
||||
additional keywords for the purpose of easing the job of writing
|
||||
test cases. All V3-keywords are of the form <code class="code">@xxx@</code>.
|
||||
Currently plans for supported keywords include:
|
||||
</p><div class="variablelist"><dl><dt><span class="term"> <code class="code"> @require@ <files> </code> </span></dt><dd><p>
|
||||
The existence of <files> is essential for the test to complete
|
||||
successfully. For example, a test case foo.C using bar.baz as
|
||||
input file could say
|
||||
</p><pre class="programlisting">
|
||||
// @require@ bar.baz</pre><p>
|
||||
The special variable % stands for the rootname, e.g. the
|
||||
file-name without its `.C' extension. Example of use (taken
|
||||
verbatim from 27_io/filebuf.cc)
|
||||
</p><pre class="programlisting">
|
||||
// @require@ %-*.tst %-*.txt</pre></dd><dt><span class="term"> <code class="code"> @diff@ <first-list> <second-list> </code> </span></dt><dd><p>
|
||||
After the test case compiles and ran successfully, diff
|
||||
<first-list> against <second-list>, these lists should
|
||||
have the same length. The test fails if diff returns non-zero a
|
||||
pair of files.
|
||||
</p></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="build.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt01ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="using.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Build </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Using</td></tr></table></div></body></html>
|
||||
The testsuite directory also contains some files that implement
|
||||
functionality that is intended to make writing test cases easier,
|
||||
or to avoid duplication, or to provide error checking in a way that
|
||||
is consistent across platforms and test harnesses. A stand-alone
|
||||
executable, called <span class="emphasis"><em>abi_check</em></span>, and a static
|
||||
library called <span class="emphasis"><em>libtestc++</em></span> are
|
||||
constructed. Both of these items are not installed, and only used
|
||||
during testing.
|
||||
</p><p>
|
||||
These files include the following functionality:
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p>
|
||||
<span class="emphasis"><em>testsuite_abi.h</em></span>,
|
||||
<span class="emphasis"><em>testsuite_abi.cc</em></span>,
|
||||
<span class="emphasis"><em>testsuite_abi_check.cc</em></span>
|
||||
</p><p>
|
||||
Creates the executable <span class="emphasis"><em>abi_check</em></span>.
|
||||
Used to check correctness of symbol versioning, visibility of
|
||||
exported symbols, and compatibility on symbols in the shared
|
||||
library, for hosts that support this feature. More information
|
||||
can be found in the ABI documentation <a class="ulink" href="abi.html" target="_top">here</a>
|
||||
</p></li><li><p>
|
||||
<span class="emphasis"><em>testsuite_allocator.h</em></span>,
|
||||
<span class="emphasis"><em>testsuite_allocator.cc</em></span>
|
||||
</p><p>
|
||||
Contains specialized allocators that keep track of construction
|
||||
and destruction. Also, support for overriding global new and
|
||||
delete operators, including verification that new and delete
|
||||
are called during execution, and that allocation over max_size
|
||||
fails.
|
||||
</p></li><li><p>
|
||||
<span class="emphasis"><em>testsuite_character.h</em></span>
|
||||
</p><p>
|
||||
Contains <code class="code">std::char_traits</code> and
|
||||
<code class="code">std::codecvt</code> specializations for a user-defined
|
||||
POD.
|
||||
</p></li><li><p>
|
||||
<span class="emphasis"><em>testsuite_hooks.h</em></span>,
|
||||
<span class="emphasis"><em>testsuite_hooks.cc</em></span>
|
||||
</p><p>
|
||||
A large number of utilities, including:
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p>VERIFY</p></li><li><p>set_memory_limits</p></li><li><p>verify_demangle</p></li><li><p>run_tests_wrapped_locale</p></li><li><p>run_tests_wrapped_env</p></li><li><p>try_named_locale</p></li><li><p>try_mkfifo</p></li><li><p>func_callback</p></li><li><p>counter</p></li><li><p>copy_tracker</p></li><li><p>copy_constructor</p></li><li><p>assignment_operator</p></li><li><p>destructor</p></li><li><p>pod_char, pod_int and associated char_traits specializations</p></li></ul></div></li><li><p>
|
||||
<span class="emphasis"><em>testsuite_io.h</em></span>
|
||||
</p><p>
|
||||
Error, exception, and constraint checking for
|
||||
<code class="code">std::streambuf, std::basic_stringbuf, std::basic_filebuf</code>.
|
||||
</p></li><li><p>
|
||||
<span class="emphasis"><em>testsuite_iterators.h</em></span>
|
||||
</p><p>
|
||||
Wrappers for various iterators.
|
||||
</p></li><li><p>
|
||||
<span class="emphasis"><em>testsuite_performance.h</em></span>
|
||||
</p><p>
|
||||
A number of class abstractions for performance counters, and
|
||||
reporting functions including:
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p>time_counter</p></li><li><p>resource_counter</p></li><li><p>report_performance</p></li></ul></div></li></ul></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch02s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt01ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="using.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Make </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Using</td></tr></table></div></body></html>
|
||||
|
File diff suppressed because one or more lines are too long
@ -18,18 +18,26 @@
|
||||
<title>Configure</title>
|
||||
|
||||
<para>
|
||||
Here are some of the non-obvious options to libstdc++'s configure.
|
||||
Keep in mind that
|
||||
When configuring libstdc++, you'll have to configure the entire
|
||||
<emphasis>gccsrcdir</emphasis> directory. Consider using the
|
||||
toplevel gcc configuration option
|
||||
<literal>--enable-languages=c++</literal>, which saves time by only
|
||||
building the C++ toolchain.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Here are all of the configure options specific to libstdc++. Keep
|
||||
in mind that
|
||||
<!-- This SECnn should be the "Choosing Package Options" section. -->
|
||||
<ulink url="http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_node/autoconf_131.html#SEC131">they
|
||||
all have opposite forms as well</ulink>
|
||||
(enable/disable and with/without). The defaults are for <emphasis>current
|
||||
development sources</emphasis>, which may be different than those for
|
||||
released versions.
|
||||
all have opposite forms as well</ulink> (enable/disable and
|
||||
with/without). The defaults are for the <emphasis>current
|
||||
development sources</emphasis>, which may be different than those
|
||||
for released versions.
|
||||
</para>
|
||||
<para>The canonical way to find out the configure options that are
|
||||
available for a given set of libstdc++ sources is to go to the
|
||||
source directory and then type:<code> ./configure --help</code>
|
||||
source directory and then type:<command>./configure --help</command>.
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
@ -121,10 +129,10 @@
|
||||
<varlistentry><term><code>--enable-libstdcxx-allocator=OPTION </code></term>
|
||||
<listitem><para>Select a target-specific underlying std::allocator. The
|
||||
choices are 'new' to specify a wrapper for new, 'malloc' to
|
||||
specify a wrapper for malloc, 'mt' for a fixed power of two allocator
|
||||
(<ulink url="ext/mt_allocator.html">documented</ulink> under extensions),
|
||||
specify a wrapper for malloc, 'mt' for a fixed power of two allocator,
|
||||
'pool' for the SGI pooled allocator or 'bitmap' for a bitmap allocator.
|
||||
This option can change the library ABI.
|
||||
This option can change the library ABI. See this page for more information on allocator
|
||||
<link linkend="allocator.ext">extensions</link>
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
|
||||
@ -153,7 +161,7 @@
|
||||
<varlistentry><term><code>--enable-libstdcxx-debug</code></term>
|
||||
<listitem><para>Build separate debug libraries in addition to what is normally built.
|
||||
By default, the debug libraries are compiled with
|
||||
<code> CXXFLAGS='-g3 -O0'</code>
|
||||
<code> CXXFLAGS='-g3 -O0 -fno-inline'</code>
|
||||
, are installed in <code>${libdir}/debug</code>, and have the
|
||||
same names and versioning information as the non-debug
|
||||
libraries. This option is off by default.
|
||||
@ -161,7 +169,7 @@
|
||||
<para>Note this make command, executed in
|
||||
the build directory, will do much the same thing, without the
|
||||
configuration difference and without building everything twice:
|
||||
<code>make CXXFLAGS='-g3 -O0' all</code>
|
||||
<code>make CXXFLAGS='-g3 -O0 -fno-inline' all</code>
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
|
||||
@ -174,7 +182,7 @@
|
||||
FLAGS is a quoted string of options, like
|
||||
</para>
|
||||
<programlisting>
|
||||
--enable-libstdcxx-debug-flags='-g3 -O1 -gdwarf-2'</programlisting>
|
||||
--enable-libstdcxx-debug-flags='-g3 -O1 -fno-inline'</programlisting>
|
||||
</listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><code>--enable-cxx-flags=FLAGS</code></term>
|
||||
@ -258,7 +266,7 @@
|
||||
<varlistentry><term><code>--enable-concept-checks</code></term>
|
||||
<listitem><para>This turns on additional compile-time checks for instantiated
|
||||
library templates, in the form of specialized templates,
|
||||
<ulink url="19_diagnostics/howto.html#3">described here</ulink>. They
|
||||
<link linkend="manual.diagnostics.concept_checking">described here</link>. They
|
||||
can help users discover when they break the rules of the STL, before
|
||||
their programs run.
|
||||
</para>
|
||||
@ -335,4 +343,4 @@
|
||||
|
||||
</variablelist>
|
||||
|
||||
</sect1>
|
||||
</sect1>
|
||||
|
@ -31,21 +31,22 @@
|
||||
The default optimizations and debug flags for a libstdc++ build
|
||||
are <code>-g -O2</code>. However, both debug and optimization
|
||||
flags can be varied to change debugging characteristics. For
|
||||
instance, turning off all optimization via the <code>-g -O0</code>
|
||||
flag will disable inlining, so that stepping through all
|
||||
functions, including inlined constructors and destructors, is
|
||||
possible. In addition,
|
||||
<code>-fno-eliminate-unused-debug-types</code> can be used when
|
||||
additional debug information, such as nested class info, is
|
||||
desired.
|
||||
instance, turning off all optimization via the <code>-g -O0
|
||||
-fno-inline</code> flags will disable inlining and optimizations,
|
||||
and add debugging information, so that stepping through all functions,
|
||||
(including inlined constructors and destructors) is possible. In
|
||||
addition, <code>-fno-eliminate-unused-debug-types</code> can be
|
||||
used when additional debug information, such as nested class info,
|
||||
is desired.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Or, the debug format that the compiler and debugger use to
|
||||
communicate information about source constructs can be changed via
|
||||
<code> -gdwarf-2 </code> or <code> -gstabs </code> flags: some
|
||||
debugging formats permit more expressive type and scope information
|
||||
to be shown in gdb. The default debug information for a particular
|
||||
<code>-gdwarf-2</code> or <code>-gstabs</code> flags: some debugging
|
||||
formats permit more expressive type and scope information to be
|
||||
shown in gdb. Expressiveness can be enhanced by flags like
|
||||
<code>-g3</code>. The default debug information for a particular
|
||||
platform can be identified via the value set by the
|
||||
PREFERRED_DEBUGGING_TYPE macro in the gcc sources.
|
||||
</para>
|
||||
@ -78,21 +79,21 @@
|
||||
debug build will persist, without having to specify
|
||||
<code>CXXFLAGS</code>, and the debug library will be installed in a
|
||||
separate directory tree, in <code>(prefix)/lib/debug</code>. For
|
||||
more information, look at the <ulink
|
||||
url="configopts.html">configuration options</ulink> document.
|
||||
more information, look at the <link
|
||||
linkend="manual.intro.setup.configure">configuration</link> section.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A second approach is to use the configuration flags
|
||||
</para>
|
||||
<programlisting>
|
||||
make CXXFLAGS='-g3 -O0' all
|
||||
make CXXFLAGS='-g3 -fno-inline -O0' all
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
This quick and dirty approach is often sufficient for quick
|
||||
debugging tasks, when you cannot or don't want to recompile your
|
||||
application to use the <ulink url="#safe">debug mode</ulink>.</para>
|
||||
application to use the <link linkend="manual.ext.debug_mode">debug mode</link>.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="debug.memory" xreflabel="debug.memory">
|
||||
@ -115,8 +116,8 @@
|
||||
thing of great importance to keep in mind when debugging C++ code
|
||||
that uses <code>new</code> and <code>delete</code>: there are
|
||||
different kinds of allocation schemes that can be used by <code>
|
||||
std::allocator </code>. For implementation details, see the <ulink
|
||||
url="ext/mt_allocator.html">mt allocator</ulink> documentation and
|
||||
std::allocator </code>. For implementation details, see the <link
|
||||
linkend="manual.ext.allocator.mt">mt allocator</link> documentation and
|
||||
look specifically for <code>GLIBCXX_FORCE_NEW</code>.
|
||||
</para>
|
||||
|
||||
@ -197,7 +198,7 @@
|
||||
|
||||
<para>
|
||||
Many options are available for gdb itself: please see <ulink
|
||||
url="http://sources.redhat.com/gdb/current/onlinedocs/gdb_13.html#SEC109">
|
||||
url="http://sources.redhat.com/gdb/current/onlinedocs/gdb_13.html#SEC125">
|
||||
"GDB features for C++" </ulink> in the gdb documentation. Also
|
||||
recommended: the other parts of this manual.
|
||||
</para>
|
||||
|
@ -707,17 +707,56 @@
|
||||
<chapter id="manual.intro.setup" xreflabel="Setup">
|
||||
<title>Setup</title>
|
||||
|
||||
<!-- Section 01 : Configure -->
|
||||
<para>To transform libstdc++ sources into installed include files
|
||||
and properly built binaries useful for linking to other software is
|
||||
a multi-step process. Steps include getting the sources,
|
||||
configuring and building the sources, testing, and installation.
|
||||
</para>
|
||||
|
||||
<para>The general outline of commands is something like:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
<emphasis>get gcc sources</emphasis>
|
||||
<emphasis>extract into gccsrcdir</emphasis>
|
||||
mkdir <emphasis>gccbuilddir</emphasis>
|
||||
cd <emphasis>gccbuilddir</emphasis>
|
||||
<emphasis>gccsrcdir</emphasis>/configure --prefix=<emphasis>destdir</emphasis> --other-opts...
|
||||
make
|
||||
make check
|
||||
make install
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Each step is described in more detail in the following sections.
|
||||
</para>
|
||||
|
||||
<!-- Section 01 : Prerequisites -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
parse="xml" href="prerequisites.xml">
|
||||
</xi:include>
|
||||
|
||||
<!-- Section 02 : Configure -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
parse="xml" href="configure.xml">
|
||||
</xi:include>
|
||||
|
||||
<!-- Section 02 : Build -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
parse="xml" href="build.xml">
|
||||
</xi:include>
|
||||
<!-- Section 03 : Make -->
|
||||
<sect1 id="manual.intro.setup.make" xreflabel="Make">
|
||||
<title>Make</title>
|
||||
<para>If you have never done this before, you should read the basic
|
||||
<ulink url="http://gcc.gnu.org/install/">GCC Installation
|
||||
Instructions</ulink> first. Read <emphasis>all of them</emphasis>.
|
||||
<emphasis>Twice.</emphasis>
|
||||
</para>
|
||||
|
||||
<!-- Section 03 : Test -->
|
||||
<para>Then type:<command>make</command>, and congratulations, you're
|
||||
started to build.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<!-- Section 04 : Test -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
parse="xml" href="test.xml">
|
||||
</xi:include>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<sect1 id="manual.intro.setup.build" xreflabel="Building">
|
||||
<?dbhtml filename="build.html"?>
|
||||
<sect1 id="manual.intro.setup.prereq" xreflabel="Prerequisites">
|
||||
<?dbhtml filename="prerequisites.html"?>
|
||||
|
||||
<sect1info>
|
||||
<keywordset>
|
||||
@ -7,28 +7,25 @@
|
||||
ISO C++
|
||||
</keyword>
|
||||
<keyword>
|
||||
build
|
||||
Prerequisites
|
||||
</keyword>
|
||||
</keywordset>
|
||||
</sect1info>
|
||||
|
||||
<title>Build</title>
|
||||
<title>Prerequisites</title>
|
||||
|
||||
<para>
|
||||
Because libstdc++ is part of GCC, the primary source for
|
||||
installation instructions is
|
||||
<ulink url="http://gcc.gnu.org/install/">the GCC install page</ulink>.
|
||||
Additional data is given here only where it applies to libstdc++.
|
||||
In particular, list of prerequisite software needed to build the library
|
||||
<ulink url="http://gcc.gnu.org/install/prerequisites.html">
|
||||
starts with those requirements.</ulink> The same pages also list
|
||||
the tools you will need if you wish to modify the source.
|
||||
</para>
|
||||
|
||||
<sect2 id="build.prereq" xreflabel="build.prereq">
|
||||
<title>Prerequisites</title>
|
||||
<para>
|
||||
The list of software needed to build the library is kept with the
|
||||
rest of the compiler, at
|
||||
<ulink url="http://gcc.gnu.org/install/prerequisites.html">
|
||||
http://gcc.gnu.org/install/prerequisites.html</ulink>. The same page
|
||||
also lists the tools you will need if you wish to modify the source.
|
||||
Additional data is given here only where it applies to libstdc++.
|
||||
</para>
|
||||
|
||||
<para>As of GCC 4.0.1 the minimum version of binutils required to build
|
||||
@ -38,7 +35,7 @@
|
||||
ftp://sources.redhat.com/pub/binutils</ulink>.
|
||||
Older releases of libstdc++ do not require such a recent version,
|
||||
but to take full advantage of useful space-saving features and
|
||||
bug-fixes you should use a recent binutils if possible.
|
||||
bug-fixes you should use a recent binutils whenever possible.
|
||||
The configure process will automatically detect and use these
|
||||
features if the underlying support is present.
|
||||
</para>
|
||||
@ -93,6 +90,7 @@ se_NO.UTF-8 UTF-8
|
||||
ta_IN UTF-8
|
||||
zh_TW BIG5
|
||||
</programlisting>
|
||||
|
||||
<para>Failure to have the underlying "C" library locale
|
||||
information installed will mean that C++ named locales for the
|
||||
above regions will not work: because of this, the libstdc++
|
||||
@ -157,26 +155,4 @@ zh_TW BIG5
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="build.configure" xreflabel="build.make">
|
||||
<title>Make</title>
|
||||
<para>If you have never done this before, you should read the basic
|
||||
<ulink url="http://gcc.gnu.org/install/">GCC Installation
|
||||
Instructions</ulink> first. Read <emphasis>all of them</emphasis>.
|
||||
<emphasis>Twice.</emphasis>
|
||||
</para>
|
||||
<para>When building libstdc++ you'll have to configure
|
||||
the entire <emphasis>gccsrcdir</emphasis> directory. The full list of libstdc++
|
||||
specific configuration options, not dependent on the specific compiler
|
||||
release being used, can be found <ulink url="configopts.html">here</ulink>.
|
||||
</para>
|
||||
<para>Consider possibly using --enable-languages=c++ to save time by only
|
||||
building the C++ language parts.
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
cd <emphasis>gccbuilddir</emphasis>
|
||||
<emphasis>gccsrcdir</emphasis>/configure --prefix=<emphasis>destdir</emphasis> --other-opts...</programlisting>
|
||||
</sect2>
|
||||
</sect1>
|
||||
</sect1>
|
@ -12,13 +12,34 @@
|
||||
<keyword>
|
||||
testsuite
|
||||
</keyword>
|
||||
<keyword>
|
||||
performance
|
||||
</keyword>
|
||||
<keyword>
|
||||
conformance
|
||||
</keyword>
|
||||
<keyword>
|
||||
ABI
|
||||
</keyword>
|
||||
<keyword>
|
||||
exception safety
|
||||
</keyword>
|
||||
</keywordset>
|
||||
</sect1info>
|
||||
|
||||
<title>Test</title>
|
||||
|
||||
<para>
|
||||
The libstdc++ testsuite includes testing for standard conformance,
|
||||
regressions, ABI, and performance.
|
||||
</para>
|
||||
|
||||
<sect2 id="test.organization" xreflabel="test.organization">
|
||||
<title>Organization</title>
|
||||
|
||||
<sect3 id="test.organization.layout" xreflabel="Directory Layout">
|
||||
<title>Directory Layout</title>
|
||||
|
||||
<para>
|
||||
The directory <emphasis>libsrcdir/testsuite</emphasis> contains the
|
||||
individual test cases organized in sub-directories corresponding to
|
||||
@ -108,10 +129,10 @@ util Files for libtestc++, utilities and testing routines.
|
||||
All new tests should be written with the policy of one test
|
||||
case, one file in mind.
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="test.naming" xreflabel="test.naming">
|
||||
<sect3 id="test.organization.naming" xreflabel="Naming Conventions">
|
||||
<title>Naming Conventions</title>
|
||||
|
||||
<para>
|
||||
@ -202,139 +223,15 @@ cat 27_io/objects/char/3_xin.in | a.out
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="test.utils" xreflabel="test.utils">
|
||||
<title>Utilities</title>
|
||||
<para>
|
||||
</para>
|
||||
<para>
|
||||
The testsuite directory also contains some files that implement
|
||||
functionality that is intended to make writing test cases easier,
|
||||
or to avoid duplication, or to provide error checking in a way that
|
||||
is consistent across platforms and test harnesses. A stand-alone
|
||||
executable, called <emphasis>abi_check</emphasis>, and a static
|
||||
library called <emphasis>libtestc++</emphasis> are
|
||||
constructed. Both of these items are not installed, and only used
|
||||
during testing.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
These files include the following functionality:
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_abi.h</emphasis>,
|
||||
<emphasis>testsuite_abi.cc</emphasis>,
|
||||
<emphasis>testsuite_abi_check.cc</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
Creates the executable <emphasis>abi_check</emphasis>.
|
||||
Used to check correctness of symbol versioning, visibility of
|
||||
exported symbols, and compatibility on symbols in the shared
|
||||
library, for hosts that support this feature. More information
|
||||
can be found in the ABI documentation <ulink url="abi.html">here</ulink>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_allocator.h</emphasis>,
|
||||
<emphasis>testsuite_allocator.cc</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
Contains specialized allocators that keep track of construction
|
||||
and destruction. Also, support for overriding global new and
|
||||
delete operators, including verification that new and delete
|
||||
are called during execution, and that allocation over max_size
|
||||
fails.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_character.h</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
Contains <code>std::char_traits</code> and
|
||||
<code>std::codecvt</code> specializations for a user-defined
|
||||
POD.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_hooks.h</emphasis>,
|
||||
<emphasis>testsuite_hooks.cc</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
A large number of utilities, including:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>VERIFY</para></listitem>
|
||||
<listitem><para>set_memory_limits</para></listitem>
|
||||
<listitem><para>verify_demangle</para></listitem>
|
||||
<listitem><para>run_tests_wrapped_locale</para></listitem>
|
||||
<listitem><para>run_tests_wrapped_env</para></listitem>
|
||||
<listitem><para>try_named_locale</para></listitem>
|
||||
<listitem><para>try_mkfifo</para></listitem>
|
||||
<listitem><para>func_callback</para></listitem>
|
||||
<listitem><para>counter</para></listitem>
|
||||
<listitem><para>copy_tracker</para></listitem>
|
||||
<listitem><para>copy_constructor</para></listitem>
|
||||
<listitem><para>assignment_operator</para></listitem>
|
||||
<listitem><para>destructor</para></listitem>
|
||||
<listitem>
|
||||
<para>pod_char, pod_int and associated char_traits specializations</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_io.h</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
Error, exception, and constraint checking for
|
||||
<code>std::streambuf, std::basic_stringbuf, std::basic_filebuf</code>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_iterators.h</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
Wrappers for various iterators.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_performance.h</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
A number of class abstractions for performance counters, and
|
||||
reporting functions including:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>time_counter</para></listitem>
|
||||
<listitem><para>resource_counter</para></listitem>
|
||||
<listitem><para>report_performance</para></listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="test.run" xreflabel="test.run">
|
||||
<title>Running the Testsuite</title>
|
||||
|
||||
<sect3 id="test.run.basic" xreflabel="test.run.basic">
|
||||
<title>Basic Results</title>
|
||||
<para>
|
||||
There are several options for running tests, including testing
|
||||
the regression tests, testing a subset of the regression tests,
|
||||
testing the performance tests, testing just compilation, testing
|
||||
installed tools, etc. In addition, there is a special rule for
|
||||
checking the exported symbols of the shared library.
|
||||
</para>
|
||||
<title>Basic</title>
|
||||
|
||||
<para>
|
||||
You can check the status of the build without installing it
|
||||
@ -361,7 +258,7 @@ cat 27_io/objects/char/3_xin.in | a.out
|
||||
<para>
|
||||
Archives of test results for various versions and platforms are
|
||||
available on the GCC website in the <ulink
|
||||
url="http://gcc.gnu.org/gcc-4.1/buildstat.html">build
|
||||
url="http://gcc.gnu.org/gcc-4.3/buildstat.html">build
|
||||
status</ulink> section of each individual release, and are also
|
||||
archived on a daily basis on the <ulink
|
||||
url="http://gcc.gnu.org/ml/gcc-testresults/current">gcc-testresults</ulink>
|
||||
@ -370,8 +267,15 @@ cat 27_io/objects/char/3_xin.in | a.out
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
<sect3 id="test.run.options" xreflabel="test.run.options">
|
||||
<title>Options</title>
|
||||
<sect3 id="test.run.variations" xreflabel="test.run.variations">
|
||||
<title>Variations</title>
|
||||
<para>
|
||||
There are several options for running tests, including testing
|
||||
the regression tests, testing a subset of the regression tests,
|
||||
testing the performance tests, testing just compilation, testing
|
||||
installed tools, etc. In addition, there is a special rule for
|
||||
checking the exported symbols of the shared library.
|
||||
</para>
|
||||
<para>
|
||||
To debug the dejagnu test harness during runs, try invoking with a
|
||||
specific argument to the variable RUNTESTFLAGS, as below.
|
||||
@ -567,7 +471,7 @@ runtest --tool libstdc++ --srcdir=/path/to/gcc/libstdc++-v3/testsuite
|
||||
</sect3>
|
||||
|
||||
<sect3 id="test.run.permutations" xreflabel="test.run.permutations">
|
||||
<title>Test Permutations</title>
|
||||
<title>Permutations</title>
|
||||
<para>
|
||||
To run the libstdc++ test suite under the <link
|
||||
linkend="manual.ext.debug_mode">debug mode</link>, edit
|
||||
@ -582,15 +486,23 @@ runtest --tool libstdc++ --srcdir=/path/to/gcc/libstdc++-v3/testsuite
|
||||
library or the test suite.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <link linkend="manual.ext.parallel_mode">parallel
|
||||
mode</link> can be tested in much the same manner, substituting
|
||||
<constant>-D_GLIBCXX_PARALLEL</constant> for
|
||||
<constant>-D_GLIBCXX_DEBUG</constant> in the previous paragraph.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Or, just run the testsuites with <constant>CXXFLAGS</constant>
|
||||
set to <constant>-D_GLIBCXX_DEBUG</constant>.
|
||||
set to <constant>-D_GLIBCXX_DEBUG</constant> or
|
||||
<constant>-D_GLIBCXX_PARALLEL</constant>.
|
||||
</para>
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="test.new_tests" xreflabel="test.new_tests">
|
||||
<title>New Test Cases</title>
|
||||
<title>Writing a new test case</title>
|
||||
|
||||
<para>
|
||||
The first step in making a new test case is to choose the correct
|
||||
@ -718,14 +630,18 @@ up in the normal.exp file.
|
||||
<para>
|
||||
More examples can be found in the libstdc++-v3/testsuite/*/*.cc files.
|
||||
</para>
|
||||
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="test.dejagnu" xreflabel="test.dejagnu">
|
||||
<title>Test Harness Details</title>
|
||||
|
||||
<sect2 id="test.harness" xreflabel="Test Harness and Utilities">
|
||||
<title>Test Harness and Utilities</title>
|
||||
|
||||
<sect3 id="test.harness.dejagnu" xreflabel="test.harness.dejagnu">
|
||||
<title>Dejagnu Harness Details</title>
|
||||
<para>
|
||||
Underlying details of testing are abstracted via the GNU Dejagnu package.
|
||||
Underlying details of testing for conformance and regressions are
|
||||
abstracted via the GNU Dejagnu package. This is similar to the
|
||||
rest of GCC.
|
||||
</para>
|
||||
|
||||
|
||||
@ -764,58 +680,125 @@ board" information unique to this library. This is currently unused and sets
|
||||
only default variables.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
</sect3>
|
||||
|
||||
<sect2 id="test.future" xreflabel="test.future">
|
||||
<title>Future</title>
|
||||
<sect3 id="test.harness.utils" xreflabel="test.utils">
|
||||
<title>Utilities</title>
|
||||
<para>
|
||||
</para>
|
||||
<para>
|
||||
The testsuite directory also contains some files that implement
|
||||
functionality that is intended to make writing test cases easier,
|
||||
or to avoid duplication, or to provide error checking in a way that
|
||||
is consistent across platforms and test harnesses. A stand-alone
|
||||
executable, called <emphasis>abi_check</emphasis>, and a static
|
||||
library called <emphasis>libtestc++</emphasis> are
|
||||
constructed. Both of these items are not installed, and only used
|
||||
during testing.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
These files include the following functionality:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Shared runs need to be implemented, for targets that support shared libraries.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Diffing of expected output to standard streams needs to be finished off.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The V3 testing framework supports, or will eventually support,
|
||||
additional keywords for the purpose of easing the job of writing
|
||||
test cases. All V3-keywords are of the form <code>@xxx@</code>.
|
||||
Currently plans for supported keywords include:
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry><term> <code> @require@ <files> </code> </term>
|
||||
<listitem>
|
||||
<para>
|
||||
The existence of <files> is essential for the test to complete
|
||||
successfully. For example, a test case foo.C using bar.baz as
|
||||
input file could say
|
||||
</para>
|
||||
<programlisting>
|
||||
// @require@ bar.baz</programlisting>
|
||||
<para>
|
||||
The special variable % stands for the rootname, e.g. the
|
||||
file-name without its `.C' extension. Example of use (taken
|
||||
verbatim from 27_io/filebuf.cc)
|
||||
</para>
|
||||
<programlisting>
|
||||
// @require@ %-*.tst %-*.txt</programlisting>
|
||||
</listitem></varlistentry>
|
||||
<varlistentry><term> <code> @diff@ <first-list> <second-list> </code> </term>
|
||||
<listitem>
|
||||
<para>
|
||||
After the test case compiles and ran successfully, diff
|
||||
<first-list> against <second-list>, these lists should
|
||||
have the same length. The test fails if diff returns non-zero a
|
||||
pair of files.
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
</variablelist>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_abi.h</emphasis>,
|
||||
<emphasis>testsuite_abi.cc</emphasis>,
|
||||
<emphasis>testsuite_abi_check.cc</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
Creates the executable <emphasis>abi_check</emphasis>.
|
||||
Used to check correctness of symbol versioning, visibility of
|
||||
exported symbols, and compatibility on symbols in the shared
|
||||
library, for hosts that support this feature. More information
|
||||
can be found in the ABI documentation <ulink url="abi.html">here</ulink>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_allocator.h</emphasis>,
|
||||
<emphasis>testsuite_allocator.cc</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
Contains specialized allocators that keep track of construction
|
||||
and destruction. Also, support for overriding global new and
|
||||
delete operators, including verification that new and delete
|
||||
are called during execution, and that allocation over max_size
|
||||
fails.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_character.h</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
Contains <code>std::char_traits</code> and
|
||||
<code>std::codecvt</code> specializations for a user-defined
|
||||
POD.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_hooks.h</emphasis>,
|
||||
<emphasis>testsuite_hooks.cc</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
A large number of utilities, including:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>VERIFY</para></listitem>
|
||||
<listitem><para>set_memory_limits</para></listitem>
|
||||
<listitem><para>verify_demangle</para></listitem>
|
||||
<listitem><para>run_tests_wrapped_locale</para></listitem>
|
||||
<listitem><para>run_tests_wrapped_env</para></listitem>
|
||||
<listitem><para>try_named_locale</para></listitem>
|
||||
<listitem><para>try_mkfifo</para></listitem>
|
||||
<listitem><para>func_callback</para></listitem>
|
||||
<listitem><para>counter</para></listitem>
|
||||
<listitem><para>copy_tracker</para></listitem>
|
||||
<listitem><para>copy_constructor</para></listitem>
|
||||
<listitem><para>assignment_operator</para></listitem>
|
||||
<listitem><para>destructor</para></listitem>
|
||||
<listitem>
|
||||
<para>pod_char, pod_int and associated char_traits specializations</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_io.h</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
Error, exception, and constraint checking for
|
||||
<code>std::streambuf, std::basic_stringbuf, std::basic_filebuf</code>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_iterators.h</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
Wrappers for various iterators.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>testsuite_performance.h</emphasis>
|
||||
</para>
|
||||
<para>
|
||||
A number of class abstractions for performance counters, and
|
||||
reporting functions including:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>time_counter</para></listitem>
|
||||
<listitem><para>resource_counter</para></listitem>
|
||||
<listitem><para>report_performance</para></listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect3>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
Loading…
Reference in New Issue
Block a user