https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109814
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-05-11 Known to work| |12.3.0 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Summary|freestanding using cmath |[13/14 Regression] |does not compile anymore |freestanding using cmath | |does not compile anymore Known to fail| |13.1.0, 14.0 --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- The new behaviour is documented at https://gcc.gnu.org/onlinedocs/gcc-13.1.0/libstdc++/manual/manual/using.html and https://gcc.gnu.org/onlinedocs/gcc-13.1.0/libstdc++/manual/manual/using_dynamic_or_shared.html and I've just added something to the release notes about it: https://gcc.gnu.org/gcc-13/changes.html#libstdcxx But that doesn't help anybody affected by this. Is it just <cmath> that you're using? We could pretty easily remove the <bits/requires_hosted.h> include from that file, and then you could include <cmath> with -ffreestanding. But if you have a truly freestanding environment (i.e. no libm present) then nothing in <cmath> is actually going to work. If people are using more than just <cmath> with -ffreestanding then things get harder. Where do we draw the line of what is part of the freestanding subset of libstdc++? Do we just let people include everything, and it's their fault if they create dependencies on malloc, __cxa_throw, RTTI etc.? That doesn't seem nice.