| ▲ | IsTom 9 hours ago | ||||||||||||||||
> should've explored a rule that required the compiler to emit a diagnostic or error for trivial loops (whether as defined by C11 or otherwise), requiring the programmer to explicitly insert ::yield or similar It wouldn't work when this kind of loop is generated by macros/templates in some unreachable case left after const folding. | |||||||||||||||||
| ▲ | rcxdude 9 hours ago | parent [-] | ||||||||||||||||
If it's truly unreachable then it's not likely to be a problem. If it is reachable and it's emerging from some macros and templates then I would be more inclined want a warning for it. | |||||||||||||||||
| |||||||||||||||||