On 4/1/20 9:36 AM, Richard Biener wrote:
This does away with enabling -ffinite-loops at -O2+ for all languages
and instead enables it selectively for C++ only.

Jason, I didn't find a reference as to when the forward progress
guarantee was introduced to C++ so I randomly chose C++11, is that
correct?

C++11 says "Implementations should ensure that all unblocked threads eventually make progress."

C++17 adds the "Forward progress" section that says

"The implementation may assume that any thread will eventually do one of the following:
 — terminate,
 — make a call to a library I/O function,
 — perform an access through a volatile glvalue, or
 — perform a synchronization operation or an atomic operation.
[Note: This is intended to allow compiler transformations such as removal of empty loops, even when termination cannot be proven. — end note]"

Jason

Reply via email to