]> 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>
Fri, 21 Jun 2024 09:10:09 +0000 (10:10 +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.

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

index b7739f13ca3d184858691cdae3cf848f396acd0e..2f9c453cbd1cfeff9e5fc208418ca1de2fa4df1e 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()