[Bug libstdc++/109814] [13/14 Regression] freestanding using cmath does not compile anymore

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 27 10:54:59 GMT 2023


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

--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Arsen Arsenović from comment #10)
> (In reply to lesto fante from comment #9)
> > In pure freestanding, I would expect smart pointer and at least parts cmath
> > to work; the compiler offer me only the FPU accelerated functionality, and
> > is up to me to implement the remaining.
> 
> a good bit is, but not cmath, as a large part of it required a runtime.  you
> should be able to use it in your configuration without -ffreestanding,
> probably

I suppose we could enable <cmath> if hosted || newlib, but that wouldn't always
be right because (IIUC) you can configure newlib without any of the libm
functions. I suppose if you use such a newlib and then include <cmath> that's
your own fault and you get to keep both pieces.


More information about the Gcc-bugs mailing list