* [committed] libstdc++: Fix typo in std::stacktrace::max_size [PR115063]
@ 2024-05-14 9:57 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2024-05-14 9:57 UTC (permalink / raw)
To: libstdc++, gcc-patches
Tested x86_64-linux. Pushed to trunk, gcc14 and gcc-13.
-- >8 --
libstdc++-v3/ChangeLog:
PR libstdc++/115063
* include/std/stacktrace (basic_stacktrace::max_size): Fix typo
in reference to _M_alloc member.
* testsuite/19_diagnostics/stacktrace/stacktrace.cc: Check
max_size() compiles.
---
libstdc++-v3/include/std/stacktrace | 2 +-
.../testsuite/19_diagnostics/stacktrace/stacktrace.cc | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/stacktrace b/libstdc++-v3/include/std/stacktrace
index 92a69a53d98..d217d63af3b 100644
--- a/libstdc++-v3/include/std/stacktrace
+++ b/libstdc++-v3/include/std/stacktrace
@@ -430,7 +430,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
[[nodiscard]]
size_type
max_size() const noexcept
- { return _Impl::_S_max_size(_M_impl._M_alloc); }
+ { return _Impl::_S_max_size(_M_alloc); }
[[nodiscard]]
const_reference
diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc
index 070c4157471..a49cddfef26 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc
@@ -206,10 +206,20 @@ test_pr105031()
s = auto(s);
}
+void
+test_pr115063()
+{
+ // PR libstdc++/115063
+ // compilation error: std::basic_stracktrace::max_size()
+ std::stacktrace s;
+ VERIFY( s.max_size() != 0 );
+}
+
int main()
{
test_cons();
test_assign();
test_swap();
test_pr105031();
+ test_pr115063();
}
--
2.44.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-14 9:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-14 9:57 [committed] libstdc++: Fix typo in std::stacktrace::max_size [PR115063] Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).