On 11/16/25 4:28 AM, Jakub Jelinek wrote:
Hi!
I've tried to test a patch to switch -std=gnu++17 C++ default
to -std=gnu++20 (will post momentarily), but ran into various problems
during GCC bootstraps, our codebase isn't fully C++20 ready.
The most common problems are arithmetic or bitwise operations
between enumerators of different enum types (or between enumerator
and floating point in the testsuite), ambiguous overloaded
operator == because of forgotten const qualification of const inside
of the argument and then libcody being largely stuck in C++ and incompatible
with C++20 which introduced char8_t type and uses it for u8 literals.
The following patch fixes various issues I've run into, for libcody
this patch just makes sure code including cody.hh can be compiled
with -std=gnu++20, libcody itself I have a tweak in the other patch.
Frankly I'm not sure what the point of libcody's u8 dance is; UTF-8 for
all the ASCII characters that it uses S2C(u8"x") for is the same byte as
the 'x' plain character literal. I'd be inclined to strip that all out.
Jason