Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bd1249cc9c4fe70efb4dae7cb463a790d684ce48
      
https://github.com/WebKit/WebKit/commit/bd1249cc9c4fe70efb4dae7cb463a790d684ce48
  Author: Patrick Griffis <pgrif...@igalia.com>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M Source/WTF/wtf/Int128.cpp

  Log Message:
  -----------
  Workaround restrict error in GCC 12
https://bugs.webkit.org/show_bug.cgi?id=272309

Reviewed by Darin Adler.

In GCC 12.3.0:

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++/12/bits/basic_string.h:431:21,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, 
_Allocator>& std::__cxx11::basic_string<_CharT, _Traits, 
_Alloc>::_M_replace(size_type, size_type, const _CharT*, size_type) [with 
_CharT = char; _Traits = std::char_traits<char>; _Alloc = 
std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.tcc:532:22,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, 
_Alloc>& std::__cxx11::basic_string<_CharT, _Traits, 
_Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = 
char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at 
/usr/include/c++/12/bits/basic_string.h:2179:19,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, 
_Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, 
const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = 
std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:1936:22,
    inlined from ‘std::ostream& WTF::operator<<(std::ostream&, Int128Impl)’ at 
/host/home/tingping/Projects/WebKit/Source/WTF/wtf/Int128.cpp:268:17:
/usr/include/c++/12/bits/char_traits.h:435:56: error: ‘void* 
__builtin_memcpy(void*, const void*, long unsigned int)’ accessing 
9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may 
overlap up to 9223372036854775813 bytes at offset -3 [-Werror=restrict]
  435 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, 
__n));
      |                                        ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~

* Source/WTF/wtf/Int128.cpp:
(WTF::operator<<):

Canonical link: https://commits.webkit.org/277203@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to