Remix.run Logo
marcosdumay 8 hours ago

Ok, I get this.

The problem is that what you want is completely against the spirit of the entire language.

If your point is that C++ should be more like C in general, I can agree with that. But if your point is that C++ should be literal on this specific case, performance be damned, and the rest of it is ok, then no, that's a bad one.

JoshTriplett 8 hours ago | parent [-]

I was utterly unconvinced that the original infinite-loop UB gave the compiler any important performance optimization, and I'm unconvinced that this is providing useful value to compensate for its surprise. If I wanted a yield in my infinite loop, I'd add one.

mitxela an hour ago | parent [-]

The original UB was to allow the compiler to merge two loops without proving termination.