]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Initialize base in test allocator's constructor
authorJonathan Wakely <jwakely@redhat.com>
Thu, 20 Jun 2024 15:13:10 +0000 (16:13 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 7 Oct 2024 08:55:21 +0000 (09:55 +0100)
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.

(cherry picked from commit e2fb245b07f489ed5bfd9a945e0053b4a3211245)

libstdc++-v3/testsuite/util/testsuite_allocator.h

index 0c41181b4a5ced1937e5034cedfebeead3a81e0d..74eae87dbf6794208b1af67eb32ff8a43e7eef9a 100644 (file)
@@ -154,7 +154,7 @@ namespace __gnu_test
       tracker_allocator()
       { }
 
-      tracker_allocator(const tracker_allocator&)
+      tracker_allocator(const tracker_allocator& a) : Alloc(a)
       { }
 
       ~tracker_allocator()