aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/doc/html
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-04-19 00:07:36 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-04-19 00:13:02 +0100
commitb153f4e4caeae05a6bcb74c200031f9060139d08 (patch)
treecc90743299e010e06b02af024a2a9966eef4b67e /libstdc++-v3/doc/html
parent3eeb4801d6f45f6250fc77a6d3ab4e0115f8cfdd (diff)
downloadgcc-b153f4e4caeae05a6bcb74c200031f9060139d08.zip
gcc-b153f4e4caeae05a6bcb74c200031f9060139d08.tar.gz
gcc-b153f4e4caeae05a6bcb74c200031f9060139d08.tar.bz2
libstdc++: Adjust uses of null pointer constants in docs
libstdc++-v3/ChangeLog: * doc/xml/manual/extensions.xml: Fix example to declare and qualify std::free, and use NULL instead of 0. * doc/html/manual/ext_demangling.html: Regenerate. * libsupc++/cxxabi.h: Adjust doxygen comments.
Diffstat (limited to 'libstdc++-v3/doc/html')
-rw-r--r--libstdc++-v3/doc/html/manual/ext_demangling.html8
1 files changed, 3 insertions, 5 deletions
diff --git a/libstdc++-v3/doc/html/manual/ext_demangling.html b/libstdc++-v3/doc/html/manual/ext_demangling.html
index 028ec71..1e7cdda8 100644
--- a/libstdc++-v3/doc/html/manual/ext_demangling.html
+++ b/libstdc++-v3/doc/html/manual/ext_demangling.html
@@ -26,6 +26,7 @@
</p><pre class="programlisting">
#include &lt;exception&gt;
#include &lt;iostream&gt;
+#include &lt;cstdlib&gt;
#include &lt;cxxabi.h&gt;
struct empty { };
@@ -33,7 +34,6 @@ struct empty { };
template &lt;typename T, int N&gt;
struct bar { };
-
int main()
{
int status;
@@ -43,11 +43,9 @@ int main()
bar&lt;empty,17&gt; u;
const std::type_info &amp;ti = typeid(u);
- realname = abi::__cxa_demangle(ti.name(), 0, 0, &amp;status);
+ realname = abi::__cxa_demangle(ti.name(), NULL, NULL, &amp;status);
std::cout &lt;&lt; ti.name() &lt;&lt; "\t=&gt; " &lt;&lt; realname &lt;&lt; "\t: " &lt;&lt; status &lt;&lt; '\n';
- free(realname);
-
- return 0;
+ std::free(realname);
}
</pre><p>
This prints