-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix various C++20 compilation related issues #9878
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…3 -O2 with gcc 13.1
Avoids ``` In file included from /usr/include/c++/13.2.1/ios:42, from /usr/include/c++/13.2.1/ostream:40, from /usr/include/c++/13.2.1/bits/unique_ptr.h:42, from /usr/include/c++/13.2.1/memory:78, from /home/even/gdal/gdal/port/cpl_error.h:255, from /home/even/gdal/gdal/port/cpl_string.h:35, from /home/even/gdal/gdal/ogr/ogr_xerces.h:36, from /home/even/gdal/gdal/ogr/ogrsf_frmts/gmlas/ogr_gmlas.h:35, from /home/even/gdal/gdal/ogr/ogrsf_frmts/gmlas/ogrgmlasutils.cpp:31: In static member function 'static constexpr std::char_traits<char>::char_type* std::char_traits<char>::copy(char_type*, const char_type*, std::size_t)', inlined from 'static constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /usr/include/c++/13.2.1/bits/basic_string.h:430:21, inlined from 'constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_mutate(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /usr/include/c++/13.2.1/bits/basic_string.tcc:335:15, inlined from 'constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_replace_aux(size_type, size_type, size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /usr/include/c++/13.2.1/bits/basic_string.tcc:468:17, inlined from 'constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::append(size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /usr/include/c++/13.2.1/bits/basic_string.h:1488:30, inlined from 'constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::resize(size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /usr/include/c++/13.2.1/bits/basic_string.tcc:405:14, inlined from 'constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::resize(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' at /usr/include/c++/13.2.1/bits/basic_string.h:1114:21, inlined from 'CPLString OGRGMLASAddSerialNumber(const CPLString&, int, size_t, int)' at /home/even/gdal/gdal/ogr/ogrsf_frmts/gmlas/ogrgmlasutils.cpp:205:26: /usr/include/c++/13.2.1/bits/char_traits.h:435:56: error: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' accessing 9223372036854775808 or more bytes at offsets 0 and 0 may overlap up to 9223372036854775809 bytes at offset -1 [-Werror=restrict] 435 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #9875