LightGBM
LightGBM copied to clipboard
Compilation warning `warning: delete called on non-final 'LightGBM::ScoreUpdater' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]`
[ 10%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/gbdt_model_text.cpp.o
In file included from /__w/1/s/src/boosting/gbdt.cpp:5:
In file included from /__w/1/s/src/boosting/gbdt.h:8:
In file included from /__w/1/s/include/LightGBM/boosting.h:8:
In file included from /__w/1/s/include/LightGBM/config.h:15:
In file included from /__w/1/s/include/LightGBM/meta.h:11:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on non-final 'LightGBM::ScoreUpdater' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
delete __ptr;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<LightGBM::ScoreUpdater>::operator()' requested here
get_deleter()(std::move(__ptr));
^
/__w/1/s/src/boosting/gbdt.cpp:25:7: note: in instantiation of member function 'std::unique_ptr<LightGBM::ScoreUpdater, std::default_delete<LightGBM::ScoreUpdater> >::~unique_ptr' requested here
GBDT::GBDT()
^
[ 12%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/boosting/gbdt_prediction.cpp.o
I guess these warning and notes were introduced in #5279.
@shiyu1994