gcc/libstdc++-v3/doc/html/manual/using_macros.html
Jonathan Wakely 544be2beb1 Remove Profile Mode, deprecated since GCC 7.1
The Profile Mode extension is not used by anybody, nor maintained by
anybody. The containers do not support the full API specified in recent
standards, and so enabling Profile Mode is not source compatible with
much modern C++ code. The heuristics that would check the profile
information and make useful suggestions never materialized, so it isn't
useful.

It should be removed.

	Remove Profile Mode, deprecated since 7.1.0
	* doc/Makefile.am: Remove XML file for profile mode docs.
	* doc/Makefile.in: Regenerate.
	* doc/xml/authors.xml: Remove authors of profile mode docs.
	* doc/xml/manual/appendix_contributing.xml: Remove mention of profile
	mode.
	* doc/xml/manual/debug.xml: Likewise.
	* doc/xml/manual/evolution.xml: Document removal of profile mode.
	* doc/xml/manual/profile_mode.xml: Remove profile mode docs.
	* doc/xml/manual/spine.xml: Remove profile mode author credit.
	* doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
	directive.
	* doc/xml/manual/using.xml: Remove docs for profile mode headers and
	macro.
	* doc/html/*: Regenerate.
	* include/Makefile.am: Remove profile mode headers.
	* include/Makefile.in: Regenerate.
	* include/bits/c++config (std::__profile): Remove namespace.
	[_GLIBCXX_PROFILE]: Remove checks for macro.
	* include/profile/array: Remove.
	* include/profile/base.h: Remove.
	* include/profile/bitset: Remove.
	* include/profile/deque: Remove.
	* include/profile/forward_list: Remove.
	* include/profile/impl/profiler.h: Remove.
	* include/profile/impl/profiler_algos.h: Remove.
	* include/profile/impl/profiler_container_size.h: Remove.
	* include/profile/impl/profiler_hash_func.h: Remove.
	* include/profile/impl/profiler_hashtable_size.h: Remove.
	* include/profile/impl/profiler_list_to_slist.h: Remove.
	* include/profile/impl/profiler_list_to_vector.h: Remove.
	* include/profile/impl/profiler_map_to_unordered_map.h: Remove.
	* include/profile/impl/profiler_node.h: Remove.
	* include/profile/impl/profiler_state.h: Remove.
	* include/profile/impl/profiler_trace.h: Remove.
	* include/profile/impl/profiler_vector_size.h: Remove.
	* include/profile/impl/profiler_vector_to_list.h: Remove.
	* include/profile/iterator_tracker.h: Remove.
	* include/profile/list: Remove.
	* include/profile/map: Remove.
	* include/profile/map.h: Remove.
	* include/profile/multimap.h: Remove.
	* include/profile/multiset.h: Remove.
	* include/profile/ordered_base.h: Remove.
	* include/profile/set: Remove.
	* include/profile/set.h: Remove.
	* include/profile/unordered_base.h: Remove.
	* include/profile/unordered_map: Remove.
	* include/profile/unordered_set: Remove.
	* include/profile/vector: Remove.
	* scripts/run_doxygen: Do not process profile mode headers.
	* testsuite/23_containers/array/element_access/60497.cc: Don't use
	profile mode type.
	* testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
	Remove dg-skip-if for profile mode.
	* testsuite/23_containers/forward_list/capacity/1.cc: Remove
	preprocessor check for profile mode.
	* testsuite/23_containers/list/capacity/29134.cc: Likewise.
	* testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
	for profile mode.
	* testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
	Likewise.
	* testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
	* testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
	* testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
	* testsuite/23_containers/set/modifiers/extract.cc: Likewise.
	* testsuite/23_containers/unordered_map/modifiers/extract.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/modifiers/extract.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
	preprocessor check for profile mode.
	* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
	Likewise.
	* testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
	Remove dg-skip-if for profile mode.
	* testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
	* testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
	* testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
	* testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
	* testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
	* testsuite/Makefile.am: Remove profile_flags variable and
	* testsuite/Makefile.am: Remove profile_flags variable and
	check-profile target.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/ext/profile/all.cc: Remove.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
	* testsuite/ext/profile/profiler_algos.cc: Remove.
	* testsuite/ext/profile/replace_new.cc: Remove.
	* testsuite/ext/throw_allocator/deallocate_global.cc: Remove
	preprocessor check for profile mode.
	* testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
	* testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
	(check_v3_target_normal_mode): Do not check for profile mode macro.
	* testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
	profile mode.
	* testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.

From-SVN: r271120
2019-05-13 11:50:21 +01:00

121 lines
10 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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>Macros</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><meta name="keywords" content="ISO C++, library" /><meta name="keywords" content="ISO C++, runtime, library" /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="using_headers.html" title="Headers" /><link rel="next" href="using_dual_abi.html" title="Dual ABI" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Macros</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="using_headers.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="using_dual_abi.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.macros"></a>Macros</h2></div></div></div><p>
All library macros begin with <code class="code">_GLIBCXX_</code>.
</p><p>
Furthermore, all pre-processor macros, switches, and
configuration options are gathered in the
file <code class="filename">c++config.h</code>, which
is generated during the libstdc++ configuration and build
process. This file is then included when needed by files part of
the public libstdc++ API, like
<code class="filename">&lt;ios&gt;</code>. Most of these
macros should not be used by consumers of libstdc++, and are reserved
for internal implementation use. <span class="emphasis"><em>These macros cannot
be redefined</em></span>.
</p><p>
A select handful of macros control libstdc++ extensions and extra
features, or provide versioning information for the API. Only
those macros listed below are offered for consideration by the
general public.
</p><p>Below are the macros which users may check for library version
information. </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="code">_GLIBCXX_RELEASE</code></span></dt><dd><p>The major release number for libstdc++. This macro is defined
to the GCC major version that the libstdc++ headers belong to,
as an integer constant.
When compiling with GCC it has the same value as GCC's pre-defined
macro <span class="symbol">__GNUC__</span>.
This macro can be used when libstdc++ is used with a non-GNU
compiler where <span class="symbol">__GNUC__</span> is not defined, or has a
different value that doesn't correspond to the libstdc++ version.
This macro first appeared in the GCC 7.1 release and is not defined
for GCC 6.x or older releases.
</p></dd><dt><span class="term"><code class="code">__GLIBCXX__</code></span></dt><dd><p>The revision date of the libstdc++ source code,
in compressed ISO date format, as an unsigned
long. For notes about using this macro and details on the value of
this macro for a particular release, please consult the
<a class="link" href="abi.html#abi.versioning.__GLIBCXX__">ABI History</a>
appendix.
</p></dd></dl></div><p>Below are the macros which users may change with #define/#undef or
with -D/-U compiler flags. The default state of the symbol is
listed.</p><p><span class="quote"><span class="quote">Configurable</span></span> (or <span class="quote"><span class="quote">Not configurable</span></span>) means
that the symbol is initially chosen (or not) based on
--enable/--disable options at library build and configure time
(documented in
<a class="link" href="configure.html" title="Configure">Configure</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
mean changing the <acronym class="acronym">ABI</acronym> of compiled code. In other words,
these choices control code which has already been compiled (i.e., in a
binary such as libstdc++.a/.so). If you explicitly #define or
#undef these macros, the <span class="emphasis"><em>headers</em></span> may see different code
paths, but the <span class="emphasis"><em>libraries</em></span> which you link against will not.
Experimenting with different values with the expectation of
consistent linkage requires changing the config headers before
building/installing the library.
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="code">_GLIBCXX_USE_DEPRECATED</code></span></dt><dd><p>
Defined by default. Not configurable. ABI-changing. Turning this off
removes older ARM-style iostreams code, and other anachronisms
from the API. This macro is dependent on the version of the
standard being tracked, and as a result may give different results for
<code class="code">-std=c++98</code> and <code class="code">-std=c++11</code>. This may
be useful in updating old C++ code which no longer meet the
requirements of the language, or for checking current code
against new language standards.
</p></dd><dt><span class="term"><code class="code">_GLIBCXX_USE_CXX11_ABI</code></span></dt><dd><p>
Defined to the value <code class="literal">1</code> by default.
Configurable via <code class="code">--disable-libstdcxx-dual-abi</code>
and/or <code class="code">--with-default-libstdcxx-abi</code>.
ABI-changing.
When defined to a non-zero value the library headers will use the
new C++11-conforming ABI introduced in GCC 5, rather than the older
ABI introduced in GCC 3.4. This changes the definition of several
class templates, including <code class="classname">std:string</code>,
<code class="classname">std::list</code> and some locale facets.
For more details see <a class="xref" href="using_dual_abi.html" title="Dual ABI">Dual ABI</a>.
</p></dd><dt><span class="term"><code class="code">_GLIBCXX_CONCEPT_CHECKS</code></span></dt><dd><p>
Undefined by default. Configurable via
<code class="code">--enable-concept-checks</code>. When defined, performs
compile-time checking on certain template instantiations to
detect violations of the requirements of the standard. This
macro has no effect for freestanding implementations.
This is described in more detail in
<a class="link" href="ext_compile_checks.html" title="Chapter 16. Compile Time Checks">Compile Time Checks</a>.
</p></dd><dt><span class="term"><code class="code">_GLIBCXX_ASSERTIONS</code></span></dt><dd><p>
Undefined by default. When defined, enables extra error checking in
the form of precondition assertions, such as bounds checking in
strings and null pointer checks when dereferencing smart pointers.
</p></dd><dt><span class="term"><code class="code">_GLIBCXX_DEBUG</code></span></dt><dd><p>
Undefined by default. When defined, compiles user code using
the <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">debug mode</a>.
When defined, <code class="code">_GLIBCXX_ASSERTIONS</code> is defined
automatically, so all the assertions enabled by that macro are also
enabled in debug mode.
</p></dd><dt><span class="term"><code class="code">_GLIBCXX_DEBUG_PEDANTIC</code></span></dt><dd><p>
Undefined by default. When defined while compiling with
the <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">debug mode</a>, makes
the debug mode extremely picky by making the use of libstdc++
extensions and libstdc++-specific behavior into errors.
</p></dd><dt><span class="term"><code class="code">_GLIBCXX_PARALLEL</code></span></dt><dd><p>Undefined by default. When defined, compiles user code
using the <a class="link" href="parallel_mode.html" title="Chapter 18. Parallel Mode">parallel
mode</a>.
</p></dd><dt><span class="term"><code class="code">_GLIBCXX_PARALLEL_ASSERTIONS</code></span></dt><dd><p>Undefined by default, but when any parallel mode header is included
this macro will be defined to a non-zero value if
<code class="code">_GLIBCXX_ASSERTIONS</code> has a non-zero value, otherwise to zero.
When defined to a non-zero value, it enables extra error checking and
assertions in the parallel mode.
</p></dd><dt><span class="term"><code class="code">__STDCPP_WANT_MATH_SPEC_FUNCS__</code></span></dt><dd><p>Undefined by default. When defined to a non-zero integer constant,
enables support for ISO/IEC 29124 Special Math Functions.
</p></dd><dt><span class="term"><code class="code">_GLIBCXX_SANITIZE_VECTOR</code></span></dt><dd><p>
Undefined by default. When defined, <code class="classname">std::vector</code>
operations will be annotated so that AddressSanitizer can detect
invalid accesses to the unused capacity of a
<code class="classname">std::vector</code>. These annotations are only
enabled for
<code class="classname">std::vector&lt;T, std::allocator&lt;T&gt;&gt;</code>
and only when <code class="classname">std::allocator</code> is derived from
<a class="link" href="memory.html#allocator.ext" title="Extension Allocators"><code class="classname">new_allocator</code>
or <code class="classname">malloc_allocator</code></a>. The annotations
must be present on all vector operations or none, so this macro must
be defined to the same value for all translation units that create,
destroy or modify vectors.
</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="using_headers.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="using.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="using_dual_abi.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Headers </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Dual ABI</td></tr></table></div></body></html>