From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 368F03858403; Mon, 25 Mar 2024 11:40:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 368F03858403 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711366842; bh=Qe9e/uXdhepXes6v2igBSaDI1j7LtUIUEaqFPKgGrjY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BghIJWM9CyRLTq3juljkvm2T40w3ICu3L+K83kPJmkF2SSjjFZ1BP7DdJo+iRwF52 VjkdcgT45cI73JLON3CoqwHgpC9FC+HYBASqHiDhv4ws3AbLX+PnHt79HCGdyPE2J5 fCp1azCF8lzNPX+HI6pYd0tGIOXfqPOISpL1hv2w= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114462] [C++26] P2809R3 - Trivial infinite loops are not undefined behavior Date: Mon, 25 Mar 2024 11:40:41 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114462 --- Comment #1 from Richard Biener --- Apart from marking via -ffinite-loops GCC considers loops without an exit as not required to make "forward progress". That's more than just a constant controlling expression but should allow optimizing most relevant cases.=