Hacker News new | ask | show | jobs
by joosters 1688 days ago
Sure, but I understand why the C spec does not define this - because not all processors can trap these events, at all times and in all situations, without added costs. And C is very much of the opinion that it doesn't want added costs - but it lets you pick and choose what you want, hence the compiler options.

I don't think there's an obvious 'good' and 'bad' choice here.

1 comments

I think the "good" choice is to remove undefined behaviour and accept that C will be slighlty slower on esoteric hardware.
This will make C much slower on your hardware, too.