On Thu, 29 Aug 2024 at 08:05, Georg Gast <georg-gcc@xxxxxxxxxxxxxxxx> wrote: > > Am Mittwoch, dem 28.08.2024 um 21:29 +0100 schrieb Jonathan Wakely: > > It was intentional, to clean up and formalise which headers are > > usable > > in freestanding mode. > > See > > https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding > > for details on the support in GCC 13 and 14. > > > > However, I think we need to revisit the decision and relax some of > > the > > new headers so they work for freestanding again. > > See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109814 and > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113398 > > Most of <chrono> is in the same category and would Just Work if we > > removed the #error > > > > > > Hi Jonathan, > > thanks for the enlightment! As i read through your links i am happy > that the newer compilers are more compliant to the standard. The past > showed me, it's always better to stay as close to the standard as > possible. I agree. However, with respect to freestanding, the standard specifies a _minimum_ of what must be supported in freestanding environments, and allows implementations to support more. What we did for GCC 13 was to reduce the set to the specified minimum, cleaning up and simplifying how we define things for freestanding (and making libstdc++ headers respect the -ffreestanding flag, which was previously ignored by the library). Now that we have a clean baseline, I think we should incrementally add back support for non-freestanding things that do actually work, such as most of <chrono>. > > For my chrono problem, i switched to boost::chrono (header only without > error code). This was pretty straight forward. As i already use boost > no big hassle. Makes sense. > > As i looked for the freestanding c++ standard i found that: > https://en.cppreference.com/w/cpp/freestanding > I wasn't aware about that... > > Now i can use my 14.2 compiler. > > Bye Georg >