In this case, I was running Unify (an old RDBMS) on a 386, and it kept
failing in mysterious ways. So, I bought a book on programming the 386
(ugh!), inspected the assembler code before and after "-O", and noticed
that a crucial instruction had been optimised right out of existence...
Hey,
Optimizers definitely are not perfect. Making alterations for efficiency that
are always identical in well defined meaning to the original code is bound to
be difficult to get right. Think of it as a challenge on the order of
translating poetry in a way that preserves all of meaning,
On Tue, 25 Jun 2024, Andreas Falkenhahn wrote:
[...]
> So the good news is that I've found a workaround. Turning the optimizer
> off will make exceptions work again but the bad news is that of course
> it looks like there is some major issue in the optimizer because
> enabling it seems to
I've done some more investigation and actually, generally speaking C++
exceptions do seem to work on PPC but for some reason not always. I experienced
some rather strange behaviour, e.g.
// this throw() worked correctly
throw(0);
if (_config->isInited) return {};
// this throw() didn't
do exceptions work with the default gcc7 compiler?
K
I'm using gcc-mp-6 (MacPorts gcc6 6.4.0_0) from 2017 on a PowerPC MacOS system
10.5. For some reason, using C++ exceptions doesn't seem to work with the
compiler. Whenever my program tries to throw an exception, it just hangs and I
need to use Ctrl-C to kill it.
Are C++ exceptions generally