Still broken in LLVM: https://gist.github.com/thestinger/f805fd61f2da9901d2fe4442d31c82ce …. Breaks memory/type safety guarantees in LLVM-based languages if they take advantage of non-returning functions like Rust. C11 does allow removing the loop but not what the 2nd example ends up doing. @johnregehr @spun_off @RichFelker
-
Show this thread
-
C11 allows removing a no-op loop without a constant control expression, so it might be valid to remove `for (;;)` in C11 (not C89/C99) but the 2nd example wrong in C11 too. Same issue with `while (1)` which is unambiguously a constant expression and cannot be removed even in C11.
3 replies 0 retweets 0 likesShow this thread -
Replying to @CopperheadOS @johnregehr
Isn't for(;;) specified as if the controlling expression were 1?
1 reply 0 retweets 0 likes -
Yes, also you can replace it with for(;1;) and Clang's behavior remains the same.
1 reply 0 retweets 0 likes
Then since 1 is an ICE I think the text about constant expression applies.
12:28 PM - 30 Sep 2017
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.