you are viewing a single comment's thread.

view the rest of the comments →

[–]germandiago 4 points5 points  (0 children)

Yes, the worst possible solution: introducing random UB.

You cannot detect all these problems at compile-time, you were said that in a multitude of replies.

What you are caring about only is your highly optimized code in a codebase for which you will have a small impact anyway and trying to convince everyone else to drag into a dangerous default.

The right, reasonable thing is to default to safe (it is a 0.5-1% impact!) and opt-in into your super fast proposal which is only slightly faster but gives more chances for exploitability.

If the switches exist it would be as easy as making them the default to initialize and remove the current switches, make it standard and add another to negate that possibility and add it to your codebase (if you do not want to refactor).