You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system (Windows/Mac/Linux, 32/64 bits): Windows, 64 bits
Compiler: mingw64\bin\c++.exe
Release or debug mode: debug
Specific flags used (if any):
CGAL version: 6.0 (from vcpkg)
Boost version:
Other libraries versions if used (Eigen, TBB, etc.):
The text was updated successfully, but these errors were encountered:
Zamsarul-hub
changed the title
mingw64/bin/c++.exe gives 'stringop-overflow' warning when compiling CGAL/Polygon_mesh_processing/repair_polygon_soup.h
'stringop-overflow' compiler warning when compiling CGAL/Polygon_mesh_processing/repair_polygon_soup.h with mingw64/bin/c++.exe
Jan 17, 2025
The warning is in an STL code about the copy of a std::vector<_Tp>, where _Tp is the type long long unsigned int (that is std::size_t). The size of that _Tp type is 8 bytes.
In static member function 'static constexpr _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = const long long unsigned int; _Up = long long unsigned int; bool _IsMove = false]',
The warning is in that function in the file bits/stl_algobase.h:
.../bits/stl_algobase.h:452:30: error: 'void* __builtin_memmove(void*, const void*, long long unsigned int)' writing between 9and9223372036854775807 bytes into a region of size 8 overflows the destination [-Werror=stringop-overflow=]
452 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if the compiler assumes that the destination region is of size 8, then sizeof(_Tp) * _Num must be 8. But the code line 452 is called only if _Num > 1 (the condition of the previous line).
I do not know what the CGAL code can change to remove that warning. It is unfortunately a false positive.
I think this issue should be closed as "not a bug" (meaning: not a bug in CGAL). What do you think, @Zamsarul-hub?
Please use the following template to help us solving your issue.
Issue Details
stringop-overflow
compilation warning when compilingrepair_polygon_soup.h
withmingw64/bin/c++.exe
.Source Code
Environment
The text was updated successfully, but these errors were encountered: