Skip to content

gcc 7.1 warning #99

@andreasbaumann

Description

@andreasbaumann
[ 23%] Building CXX object src/storage/CMakeFiles/strus_storage_static.dir/forwardIndexMap.cpp.o
In file included from /usr/include/c++/7.2.0/map:60:0,
                 from /data/work/strus/strus/src/storage/forwardIndexBlock.hpp:13,
                 from /data/work/strus/strus/src/storage/forwardIndexMap.hpp:11,
                 from /data/work/strus/strus/src/storage/forwardIndexMap.cpp:8:
/usr/include/c++/7.2.0/bits/stl_tree.h: In function 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<const strus::ForwardIndexMap::MapKey&>, std::tuple<>}; _Key = strus::ForwardIndexMap::MapKey; _Val = std::pair<const strus::ForwardIndexMap::MapKey, unsigned int>; _KeyOfValue = std::_Select1st<std::pair<const strus::ForwardIndexMap::MapKey, unsigned int> >; _Compare = std::less<strus::ForwardIndexMap::MapKey>; _Alloc = strus::LocalStructAllocator<std::pair<const strus::ForwardIndexMap::MapKey, unsigned int> >]':
/usr/include/c++/7.2.0/bits/stl_tree.h:2395:7: note: parameter passing for argument of type 'std::_Rb_tree<strus::ForwardIndexMap::MapKey, std::pair<const strus::ForwardIndexMap::MapKey, unsigned int>, std::_Select1st<std::pair<const strus::ForwardIndexMap::MapKey, unsigned int> >, std::less<strus::ForwardIndexMap::MapKey>, strus::LocalStructAllocator<std::pair<const strus::ForwardIndexMap::MapKey, unsigned int> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const strus::ForwardIndexMap::MapKey, unsigned int> >}' changed in GCC 7.1
       _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7.2.0/map:61:0,
                 from /data/work/strus/strus/src/storage/forwardIndexBlock.hpp:13,
                 from /data/work/strus/strus/src/storage/forwardIndexMap.hpp:11,
                 from /data/work/strus/strus/src/storage/forwardIndexMap.cpp:8:
/usr/include/c++/7.2.0/bits/stl_map.h: In member function 'void strus::ForwardIndexMap::closeCurblock(const Index&, strus::ForwardIndexMap::CurblockElemList&)':
/usr/include/c++/7.2.0/bits/stl_map.h:493:4: note: parameter passing for argument of type 'std::_Rb_tree<strus::ForwardIndexMap::MapKey, std::pair<const strus::ForwardIndexMap::MapKey, unsigned int>, std::_Select1st<std::pair<const strus::ForwardIndexMap::MapKey, unsigned int> >, std::less<strus::ForwardIndexMap::MapKey>, strus::LocalStructAllocator<std::pair<const strus::ForwardIndexMap::MapKey, unsigned int> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const strus::ForwardIndexMap::MapKey, unsigned int> >}' changed in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~
/usr/include/c++/7.2.0/bits/stl_map.h: In member function 'void strus::ForwardIndexMap::renameNewDocNumbers(const std::map<int, int>&)':
/usr/include/c++/7.2.0/bits/stl_map.h:493:4: note: parameter passing for argument of type 'std::_Rb_tree<strus::ForwardIndexMap::MapKey, std::pair<const strus::ForwardIndexMap::MapKey, unsigned int>, std::_Select1st<std::pair<const strus::ForwardIndexMap::MapKey, unsigned int> >, std::less<strus::ForwardIndexMap::MapKey>, strus::LocalStructAllocator<std::pair<const strus::ForwardIndexMap::MapKey, unsigned int> > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const strus::ForwardIndexMap::MapKey, unsigned int> >}' changed in GCC 7.1
    __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
    ^~~

compiled on ARM, but should happen on other platforms too.

Can this be fixed in a way not to break on older gcc's, I wonder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions