https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117210
Dimitry Andric <dimitry at andric dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dimitry at andric dot com --- Comment #6 from Dimitry Andric <dimitry at andric dot com> --- It's conditionalized on _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC in <cstdlib> namespace std { #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC using ::__gnu_cxx::lldiv_t; #endif using ::__gnu_cxx::_Exit; #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC using ::__gnu_cxx::llabs; using ::__gnu_cxx::div; using ::__gnu_cxx::lldiv; #endif using ::__gnu_cxx::atoll; using ::__gnu_cxx::strtof; using ::__gnu_cxx::strtoll; using ::__gnu_cxx::strtoull; using ::__gnu_cxx::strtold; } // namespace std In the FreeBSD port I see in /usr/local/lib/gcc15/include/c++/x86_64-portbld-freebsd15.0/bits/os_defines.h: #define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999)) #define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1 #if _GLIBCXX_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED #define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC 1 #else #define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC 0 #endif I think __LONG_LONG_SUPPORTED is supposed to come out of a base system header, /usr/include/sys/cdefs.h, and similar for __ISO_C_VISIBLE. However, this piece of code in FreeBSD's os_defines.h changed not that long ago, in commit r15-3904-ge23e5370d58 for bug 116859: --- a/libstdc++-v3/config/os/bsd/freebsd/os_defines.h +++ b/libstdc++-v3/config/os/bsd/freebsd/os_defines.h @@ -36,8 +36,16 @@ #define _GLIBCXX_USE_C99_CHECK 1 #define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999)) #define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1 -#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC (_GLIBCXX_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED) +#if _GLIBCXX_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED +#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC 1 +#else +#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC 0 +#endif #define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_CHECK 1 -#define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC defined _XOPEN_SOURCE +#ifdef _XOPEN_SOURCE +#define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC 1 +#else +#define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC 0 +#endif #endif There is a good chance this commit is the reason.