From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9690F3857008; Wed, 5 Aug 2020 15:56:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9690F3857008 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596643018; bh=KjZ6qSsZFSC8PKkfzb/SB6D+IN+ekZhm9C/YkpgUsQs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Z+YGUx80jK00RUqPFLt5QriYeD2k0S14pXGCfaFYmk9/20eSXKK/5eo4hTRev9jnZ AI7Mf9z1bV7vVxEGUPCh+AZrmg3jy+ewSeX1PdlXhKCGN9fX147jhoP/PxuizMKK4Y SINat0KtFyFMlU0+T90DOLMR9f4xVXor2KspaFEY= From: "josephcsible at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/96468] Warn when an empty while loop could have been a do-while Date: Wed, 05 Aug 2020 15:56:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: josephcsible at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2020 15:56:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96468 --- Comment #5 from Joseph C. Sible --- I didn't have termination checking in mind at all for this. I envisioned the warning triggering any time a "while" loop's body was just a semicolon, when the "while" isn't the first statement in its block.=