https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68737
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- I assume the implementation in libstdc++-v3/config/locale/generic/c_locale.h is used for HPUX, so one of these is returning an error, which we then use as __len: #if _GLIBCXX_USE_C99_STDIO const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); #else const int __ret = __builtin_vsprintf(__out, __fmt, __args); #endif