mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Work around bug in gcc 11.4.0 causing spurious compile error
This commit is contained in:
parent
9a9b4af6c5
commit
efae642813
@ -177,8 +177,8 @@ if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_compile_options(-Wno-strict-overflow)
|
||||
add_compile_options(-Wno-maybe-uninitialized)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 11.3.0)
|
||||
# GCC 11.3 wrongly yields this warning:
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11.3.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 11.4.0)
|
||||
# These versions of gcc wrongly yield this warning:
|
||||
# dlib::row_major_layout::layout<double, 0, 2, dlib::memory_manager_stateless_kernel_1<char> >::data’ with nonzero offset 8 [-Werror=free-nonheap-object]
|
||||
# 61 | delete [] item;
|
||||
# Which by inspection of the dlib::row_major_layout::layout class you can see is clearly incorrect, as `data` is most
|
||||
|
Loading…
Reference in New Issue
Block a user