Hello, On Mon, 8 Sep 2025, Ville Voutilainen wrote:
> But I can (more slowly) dig up what the other developer tried to use for > the prints. It isn't printf, printf doesn't trigger the problem because > optimizers know what printf is. The print function was some > android-specific logging function that clang didn't recognize as an i/o > function that should've just effected<sic> the barrier automatically. > > So, at the end of the day, even if it was some clang bug where it > over-eagerly nuked a whole CFG path even with an opaque or a > side-effectful call on it, such things happen in practice, and *maybe* > they happen less likely if compilers recognize an > observable_checkpoint(). Maybe. If a compiler has a bug resulting in removing observable side-effects there is no rational reason to believe that adding a mean to add more observable side-effects into the language (that in the end can be 'hidden' in called external functions) would magically fix such bugs. Instead the bug needs to be fixed. I think that magic thinking is what Richi refers to as FUD. Ciao, Michael.