[Bug 280562] [exp-run] Against llvm-19-update branch on GitHub

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 27 Oct 2024 10:59:29 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280562

--- Comment #99 from commit-hook@FreeBSD.org ---
A commit in branch stable/13 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=737111920ce3ccd82d93af765e38e51f3a2d359d

commit 737111920ce3ccd82d93af765e38e51f3a2d359d
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-10-24 21:42:36 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-10-27 10:58:37 +0000

    Fix buildworld with gcc 13 after llvm-19 import

    It turns out the new libc++ 19 headers result in a -Werror warning from
    gcc 13:

      In file included from
/usr/obj/usr/src/freebsd/src/amd64.amd64/tmp/usr/include/c++/v1/__memory/shared_ptr.h:31:
     
/usr/obj/usr/src/freebsd/src/amd64.amd64/tmp/usr/include/c++/v1/__memory/uninitialized_algorithms.h:
In instantiation of 'constexpr void
std::__1::__uninitialized_allocator_relocate(_Alloc&, _Tp*, _Tp*, _Tp*) [with
_Alloc = allocator<basic_string<char> >; _Tp = basic_string<char>]':
     
/usr/obj/usr/src/freebsd/src/amd64.amd64/tmp/usr/include/c++/v1/vector:1052:42:
  required from 'void std::__1::vector<_Tp,
_Alloc>::__swap_out_circular_buffer(std::__1::__split_buffer<_Tp,
_Allocator&>&) [with _Tp = std::__1::basic_string<char>; _Allocator =
std::__1::allocator<std::__1::basic_string<char> >]'
     
/usr/obj/usr/src/freebsd/src/amd64.amd64/tmp/usr/include/c++/v1/vector:1469:31:
  required from 'void std::__1::vector<_Tp, _Alloc>::reserve(size_type) [with
_Tp = std::__1::basic_string<char>; _Allocator =
std::__1::allocator<std::__1::basic_string<char> >; size_type = long unsigned
int]'
      /usr/src/freebsd/src/contrib/googletest/googletest/src/gtest.cc:795:27:  
required from here
     
/usr/obj/usr/src/freebsd/src/amd64.amd64/tmp/usr/include/c++/v1/__memory/uninitialized_algorithms.h:645:21:
error: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing
to an object of type 'std::__1::__remove_const_t<std::__1::basic_string<char>
>' {aka 'class std::__1::basic_string<char>'} with no trivial copy-assignment;
use copy-assignment or copy-initialization instead o[-Werror=class-memaccess]
        645 |    
__builtin_memcpy(const_cast<__remove_const_t<_Tp>*>(__result), __first,
sizeof(_Tp) * (__last - __first));
            |    
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from
/usr/obj/usr/src/freebsd/src/amd64.amd64/tmp/usr/include/c++/v1/__system_error/error_category.h:15,
                       from
/usr/obj/usr/src/freebsd/src/amd64.amd64/tmp/usr/include/c++/v1/__system_error/error_code.h:18,
                       from
/usr/obj/usr/src/freebsd/src/amd64.amd64/tmp/usr/include/c++/v1/__ostream/basic_ostream.h:16:
     
/usr/obj/usr/src/freebsd/src/amd64.amd64/tmp/usr/include/c++/v1/string:752:7:
note: 'std::__1::__remove_const_t<std::__1::basic_string<char> >' {aka 'class
std::__1::basic_string<char>'} declared here
        752 | class basic_string {
            |       ^~~~~~~~~~~~

    Since this is all benign, turn off errors for -Wclass-memaccess.

    PR:             280562
    MFC after:      3 days

    (cherry picked from commit a3a88aa132605c5d42153a419c0e129296dec467)

 share/mk/bsd.sys.mk | 1 +
 1 file changed, 1 insertion(+)

-- 
You are receiving this mail because:
You are on the CC list for the bug.