Hi Jürgen,

thank you.
I found some "u8 / g++ standard" - postings but I did not spent much time on them.
Just happy, that my wild gess  "grep .. sed"-onliner had some merits:-)

Best Regards
Hans-Peter

On 10/06/2026 12:59, Dr. Jürgen Sauermann via Bugs and suggestions for GNU APL wrote:
Hi Hans-Peter,

thanks for reporting this.

The problem is that C++20 changed the type of u8"..." string literals from
const char* to const char8_t*, and GCC 16 now explicitly deletes
operator<<(ostream&, const char8_t*) as required by the standard, so any
u8"..." literal streamed to cout/cerr or returned as const char* fails to
compile.

The fix is to drop the u8 prefix throughout — the source files are UTF-8
encoded, so the bare string literals carry the correct bytes already.
I have removed the prefix from all affected .cc/.hh/.def files; fixed
is in *SVN 2009*.

Best regards,
Jürgen

P.S. This fix was prepared with the help of Claude Code (claude.ai/code).
     GNU APL is tracked at https://savannah.gnu.org/projects/apl/


On 6/9/26 23:15, Hans-Peter Sorge wrote:
Hi,

Revision: 2008

Compile fails with

make[3]: Verzeichnis „/OTH/APL/trunk/src/native“ wird betreten
/bin/sh ../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..     -I ./.. -g -O2  -g -O2 -I /OTH/APL/trunk -MT lib_file_io_la-file_io.lo -MD -MP -MF .deps/lib_file_i o_la-file_io.Tpo -c -o lib_file_io_la-file_io.lo `test -f 'file_io.cc' || echo './'`file_io.cc libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I ./.. -g -O2 -g -O2 -I /OTH/APL/trunk -MT lib_file_io_la-file_io.lo -MD -MP -MF .deps/lib_file_io_la-file_io.Tpo -c file_io.cc  -fPI
C -DPIC -o .libs/lib_file_io_la-file_io.o
In file included from ../PrintBuffer.hh:32,
                from ../Cell.hh:31,
                from ../CharCell.hh:27,
                from ../Value.hh:27,
                from ../NamedObject.hh:28,
                from ../Function.hh:30,
                from ../PrimitiveFunction.hh:28,
                from ../PrimitiveOperator.hh:27,
                from ../Quad_FIO.hh:35,
                from file_io.cc:29:
../UCS_string_vector.hh:In member function 'std::ostream& UCS_string_vector::dump(std::ostream&, const char*) const': ../UCS_string_vector.hh:56:16:error: use of deleted function 'std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char8_t*) [with _Traits = char_tra
its<char>]'
  56 |         out << u8"────────  "<< loc << u8"  ──────── " << endl;
     | ^~~~~~~~~~~~~~
In file included from /usr/include/c++/16/ostream:42,
                from /usr/include/c++/16/istream:43,
                from /usr/include/c++/16/sstream:42,
                from /usr/include/c++/16/complex:50,
                from ../Common.hh:69,
                from ../Backtrace.hh:29,
                from ../Error_macros.hh:27,
                from ../Quad_FIO.hh:34:
/usr/include/c++/16/bits/ostream.h:767:5:note: declared here
 767 | operator<<(basic_ostream<char, _Traits>&, const char8_t*) = delete;
     | ^~~~~~~~
../UCS_string_vector.hh:56:16:note: use '-fdiagnostics-all-candidates' to display considered candidates
  56 |         out << u8"────────  "<< loc << u8"  ──────── " << endl;
     | ^~~~~~~~~~~~~~


crude teporary fix: removing the u8 prefix:
grep-r  'u8"' src/* | sed 's/:.*//' | uniq | while read name; do sed -i 's/u8"/"/g' $name ;done


g++ --version
g++ (GCC) 16.1.1 20260515 (Red Hat 16.1.1-2)
Copyright (C) 2026 Free Software Foundation, Inc.
Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es
gibt KEINE Garantie; auch nicht für MARKTGÄNGIGKEIT oder FÜR SPEZIELLE ZWECKE.

Best Regards
Hans-Peter



Reply via email to