On Tue, 26 May 2026 at 06:36, Stephan Bergmann <[email protected]> wrote:
>
> At least with clang-22.1.5-1.fc44.x86_64 and with recent Clang 23 trunk,
> this started to fail
>
> > $ cat test.cc
> > #include <string>
> > int main(int argc, char **) {
> >   char buf[32] = {};
> >   return std::string(buf, buf + argc + 20).size();
> > }
>
> > $ clang++ 
> > --gcc-install-dir=/home/sberg/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0 
> > -O1 test.cc
> > /usr/bin/ld.bfd: /tmp/test-caae58.o: in function `main':
> > test.cc:(.text+0x32): undefined reference to 
> > `std::__cxx11::basic_string<char, std::char_traits<char>, 
> > std::allocator<char> >::_M_create_plus(unsigned long, unsigned long)'
> > clang++: error: linker command failed with exit code 1 (use -v to see 
> > invocation)

It works fine with clang-21.1.8-4.fc43.x86_64 and clang-22.1.5-1.fc44.aarch64

Reply via email to