https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106283
--- Comment #5 from Xuanyu Chen <xan9xxx at gmail dot com> --- A quick follow-up on comment 4. I tested the unchecked -> closed transition using the existing close () model as a comparison: - Calling close (fd) on an unchecked fd, then calling close (fd) again on the fd == -1 branch, produces -Wanalyzer-fd-double-close. - Checking fd == -1 before both close calls produces no double-close warning. In both cases, fd comes from open (). This tests the existing close () behavior, not a closefrom implementation. Would you prefer unchecked -> closed for closefrom (0), matching on_close, or a more conservative transition to stop? Any feedback on the rest of the plan in comment 4 would also be helpful.
