3 ms·
I was basically asking if the options on gcc or whatever allow you to turn on only optimizations at the assembly language level of abstraction. Which it seems t
by perl4ever 7y ago
I was basically asking if the options on gcc or whatever allow you to turn on only optimizations at the assembly language level of abstraction. Which it seems to me would be a practical way to avoid the sort of optimizations that surprise people while not emitting totally unoptimized code. Maybe that's -O1 or -O2, I don't remember because it's been a long time.
- MaxBarraclough 7y agoPerhaps you could set flags to disable all optimisations except the ones you specifically enable. Unless the compiler promises to handle the various forms of undefined behaviour in specific 'safe' ways, this approach isn't going to be robust. GCC doesn't offer a way to safely handle all instances of UB. That would be a significant undertaking.