This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
gcc diagnostic bug ?
- From: François Dumont <frs dot dumont at gmail dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>, libstdc++ at gcc dot gnu dot org, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 4 Jan 2018 22:12:20 +0100
- Subject: gcc diagnostic bug ?
- Authentication-results: sourceware.org; auth=none
- References: <5a33315f.waqe+bTfodtnaE5K%jwakely.gcc@gmail.com>
On 15/12/2017 03:20, Jonathan Wakely wrote:
FAIL: 23_containers/vector/cons/destructible_neg.cc (test for errors, line 35)
FAIL: 23_containers/vector/cons/destructible_neg.cc (test for errors, line 41)
I had a look at this remaining issue. The compilation result is:
In file included from
/home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_tempbuf.h:60,
from
/home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_algo.h:62,
from
/home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/algorithm:62,
from
/home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/stdc++.h:65,
from <command-line>:0:
/home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_construct.h:
In instantiation of 'void std::_Destroy(_ForwardIterator,
_ForwardIterator) [with _ForwardIterator = DeletedDtor*]':
/home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_construct.h:206:
required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator,
std::allocator<_T2>&) [with _ForwardIterator = DeletedDtor*; _Tp =
DeletedDtor]'
/home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_vector.h:612:
required from 'std::__cxx1998::vector<_Tp, _Alloc>::~vector() [with _Tp
= DeletedDtor; _Alloc = std::allocator<DeletedDtor>]'
/home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/debug/vector:155:
required from here
The code at debug/vector:155 is:
vector() = default;
So no trace of a call to the ~std::__cxx1998::vector<> at that point.
I guess gcc tries to instantiate the destructor when generating the
default vector constructor but IMO it shouldn't be visible in the
compilation error message.
Should we report this as a gcc bug ?
François