https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98861
--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> --- > > (In reply to cqwrteur from comment #12) > > > stdio.h should not get included in any circumstances for EH. You are > > > implementing the operating system, but you need to enable EH by the > > > standard > > > and EH relies on stdio. Chicken-egg problem. > > > > It doesn't depend on stdio though. What are you talking about? > > https://github.com/gcc-mirror/gcc/blob/ > e11e5d3889f9e54c547efee50fa1b72b50f0f265/libstdc%2B%2B-v3/libsupc%2B%2B/ > vterminate.cc#L93 Which is disabled in freestanding, and can be optionally disabled in hosted. This is an OPTIONAL feature of libstdc++, not something that exception handling intrinsically relies on. If you don't want it, you don't have to use it. And if you're implementing the OS then you're using freestanding and it's automatically disabled. Looks at line 27 in that file. Once again you are talking out of your backside. Stop wasting our time.