On Tue, 12 May 2020 at 09:17, Freddie Chopin wrote: > The problem with C++ exceptions is that even in the most > trivial of the programs and even if you don't explicitly > use/catch/throw them, they instantly eat around 60 kB of ROM and quite > a lot of RAM. With some hacking you can get down to about 20 kB of ROM > (by overriding a lot of string formatting code and overriding > std::terminate()),
You're talking about C++ exceptions in general, but the problems you mention seems to be issues with specific implementation properties. If the comments above are referring to the libstdc++ verbose terminate handler, that's configurable. Configuring GCC with --disable-libstdcxx-verbose will disable that, and so will building libstdc++ with -fno-exceptions. That was fixed years ago. If there are remaining problems where I/O and string routines get dragged in without exceptions and the verbose terminate handler, please report bugs against libstdc++. I would expect heroics to be needed for a tiny footprint, but it should be possible to get a small footprint just by rebuilding with the right options and flags.