diff mbox series

[committed] libstdc++: Initialize base in test allocator's constructor

Message ID 20240621091430.2204026-1-jwakely@redhat.com
State New
Headers show
Series [committed] libstdc++: Initialize base in test allocator's constructor | expand

Commit Message

Jonathan Wakely June 21, 2024, 9:14 a.m. UTC
Tested x86_64-linux. Pushed to trunk.

-- >8 --

This fixes a warning from one of the test allocators:
warning: base class 'class std::allocator<__gnu_test::copy_tracker>' should be explicitly initialized in the copy constructor [-Wextra]

libstdc++-v3/ChangeLog:

	* testsuite/util/testsuite_allocator.h (tracker_allocator):
	Initialize base class in copy constructor.
---
 libstdc++-v3/testsuite/util/testsuite_allocator.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h
index b7739f13ca3..2f9c453cbd1 100644
--- a/libstdc++-v3/testsuite/util/testsuite_allocator.h
+++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h
@@ -154,7 +154,7 @@  namespace __gnu_test
       tracker_allocator()
       { }
 
-      tracker_allocator(const tracker_allocator&)
+      tracker_allocator(const tracker_allocator& a) : Alloc(a)
       { }
 
       ~tracker_allocator()