https://bugs.kde.org/show_bug.cgi?id=473677

            Bug ID: 473677
           Summary: make check compile failure with Clang 16 based on GCC
                    13.x
    Classification: Developer tools
           Product: valgrind
           Version: 3.22 GIT
          Platform: Ubuntu
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: jsew...@acm.org
          Reporter: fanqu...@gmail.com
  Target Milestone: ---

Compiling valgrind git (bc2f62950ccb12f79072b7eacc9ec43ec244496a) on Ubuntu
Mantic using Clang 16 (Ubuntu clang version 16.0.6 (9)) with a GCC 13 (gcc
(Ubuntu 13.2.0-1ubuntu1) 13.2.0) installation currently fails with:

./autogen.sh
./configure CC=clang CXX=clang++
make
....
clang++ -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../include -I../../coregrind
-I../../include -I../../VEX/pub -I../../VEX/pub -DVGA_amd64=1 -DVGO_linux=1
-DVGP_amd64_linux=1 -DVGPV_amd64_linux_vanilla=1    -std=c++17
-Wno-mismatched-new-delete  -MT cxx17_aligned_new-cxx17_aligned_new.o -MD -MP
-MF .deps/cxx17_aligned_new-cxx17_aligned_new.Tpo -c -o
cxx17_aligned_new-cxx17_aligned_new.o `test -f 'cxx17_aligned_new.cpp' || echo
'./'`cxx17_aligned_new.cpp
cxx17_aligned_new.cpp:25:5: error: no matching function for call to 'operator
delete'
    operator delete(myClass, 64U, std::align_val_t(64U));
    ^~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/new:155:6:
note: candidate function not viable: no known conversion from 'unsigned int' to
'std::align_val_t' for 2nd argument
void operator delete(void*, std::align_val_t, const std::nothrow_t&)
     ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/new:180:13:
note: candidate function not viable: requires 2 arguments, but 3 were provided
inline void operator delete  (void*, void*) _GLIBCXX_USE_NOEXCEPT { }
            ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/new:153:6:
note: candidate function not viable: requires 2 arguments, but 3 were provided
void operator delete(void*, std::align_val_t)
     ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/new:144:6:
note: candidate function not viable: requires 2 arguments, but 3 were provided
void operator delete(void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
     ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/new:130:6:
note: candidate function not viable: requires 1 argument, but 3 were provided
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
     ^
cxx17_aligned_new.cpp:28:5: error: no matching function for call to 'operator
delete[]'
    operator delete [](myClass5, 320U, std::align_val_t(64U));
    ^~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/new:163:6:
note: candidate function not viable: no known conversion from 'unsigned int' to
'std::align_val_t' for 2nd argument
void operator delete[](void*, std::align_val_t, const std::nothrow_t&)
     ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/new:181:13:
note: candidate function not viable: requires 2 arguments, but 3 were provided
inline void operator delete[](void*, void*) _GLIBCXX_USE_NOEXCEPT { }
            ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/new:161:6:
note: candidate function not viable: requires 2 arguments, but 3 were provided
void operator delete[](void*, std::align_val_t)
     ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/new:146:6:
note: candidate function not viable: requires 2 arguments, but 3 were provided
void operator delete[](void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
     ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/new:132:6:
note: candidate function not viable: requires 1 argument, but 3 were provided
void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT
     ^
2 errors generated.

The same occurs using Fedora Rawhide with Clang 16 (clang version 16.0.6
(Fedora 16.0.6-3.fc39)) & GCC 13 (gcc (GCC) 13.2.1 20230728 (Red Hat
13.2.1-1)):

clang++ -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../include -I../../coregrind
-I../../include -I../../VEX/pub -I../../VEX/pub -DVGA_amd64=1 -DVGO_linux=1
-DVGP_amd64_linux=1 -DVGPV_amd64_linux_vanilla=1    -std=c++17
-Wno-mismatched-new-delete  -MT cxx17_aligned_new-cxx17_aligned_new.o -MD -MP
-MF .deps/cxx17_aligned_new-cxx17_aligned_new.Tpo -c -o
cxx17_aligned_new-cxx17_aligned_new.o `test -f 'cxx17_aligned_new.cpp' || echo
'./'`cxx17_aligned_new.cpp
cxx17_aligned_new.cpp:25:5: error: no matching function for call to 'operator
delete'
    operator delete(myClass, 64U, std::align_val_t(64U));
    ^~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/new:155:6:
note: candidate function not viable: no known conversion from 'unsigned int' to
'std::align_val_t' for 2nd argument
void operator delete(void*, std::align_val_t, const std::nothrow_t&)
     ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/new:180:13:
note: candidate function not viable: requires 2 arguments, but 3 were provided
inline void operator delete  (void*, void*) _GLIBCXX_USE_NOEXCEPT { }
            ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/new:153:6:
note: candidate function not viable: requires 2 arguments, but 3 were provided
void operator delete(void*, std::align_val_t)
     ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/new:144:6:
note: candidate function not viable: requires 2 arguments, but 3 were provided
void operator delete(void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
     ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/new:130:6:
note: candidate function not viable: requires 1 argument, but 3 were provided
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
     ^
cxx17_aligned_new.cpp:28:5: error: no matching function for call to 'operator
delete[]'
    operator delete [](myClass5, 320U, std::align_val_t(64U));
    ^~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/new:163:6:
note: candidate function not viable: no known conversion from 'unsigned int' to
'std::align_val_t' for 2nd argument
void operator delete[](void*, std::align_val_t, const std::nothrow_t&)
     ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/new:181:13:
note: candidate function not viable: requires 2 arguments, but 3 were provided
inline void operator delete[](void*, void*) _GLIBCXX_USE_NOEXCEPT { }
            ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/new:161:6:
note: candidate function not viable: requires 2 arguments, but 3 were provided
void operator delete[](void*, std::align_val_t)
     ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/new:146:6:
note: candidate function not viable: requires 2 arguments, but 3 were provided
void operator delete[](void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
     ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/new:132:6:
note: candidate function not viable: requires 1 argument, but 3 were provided
void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT
     ^
2 errors generated.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to