From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 97E4D3844041; Wed, 5 Aug 2020 15:03:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97E4D3844041 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596639795; bh=eiGNroCuIq4/YJhzFY8CERRSQZTQKXv28eQfeET4mbQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DLd7jpg6Rx+cNJ4lgpqgKpsT9rBgCSNXOUv5EYxiLKoBQaUfdyFImWxa46C5F1AG6 H4U8hWKgfm6dpigzrs3gqbZhM/tDKhLexfTH0ozolUgm6OROKM4wuRcrw5ctaYzogi 5d2Pk7YJqG78hlj6Vz3Eb286acW3gxIW59OiAB3c= From: "josephcsible at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/96468] Warn when an empty while loop could have been a do-while Date: Wed, 05 Aug 2020 15:03:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c 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:03:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96468 --- Comment #3 from Joseph C. Sible --- I didn't intend to restrict this to only volatile control variables. If you have "_Bool canMoveOn(void);", I'd like "while(!canMoveOn());" in place of "while(!signaled);" to warn too for the exact same reasons.=