https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94545
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- cppreference does document this, see the second row of the "Return value" table at https://en.cppreference.com/w/cpp/types/numeric_limits/max