https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120305

--- Comment #13 from aneris <aneris at disroot dot org> ---
(In reply to Jonathan Wakely from comment #12)
> tl;dr if you want to compile with strict -std=c++20 -pedantic settings, you
> need to strictly follow the rules of the standard.

I understand, though, at the very least, couldn't this be made a warning for
-pedantic? I think that would be immensely useful.

On another note, this code does compile with Clang. Apparently godbolt defaults
to libstdc++ for clang instead of libc++ and that caused all the confusion.

Here: https://godbolt.org/z/j6fYMdjeo

I did some digging and this is because std::is_integral_v<__int128_t> is
unconditionally true in libc++, unlike in libstdc++ where it's only true when
the GNU extensions are enabled.

So I was wondering, is it really out of the question to promote __int128_t to
an integer type by default like Clang? It'd make some code more compatible.

Reply via email to