From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4D5773858D28; Mon, 7 Aug 2023 11:00:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4D5773858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691406057; bh=ZSF347urpl3XEJUnSM7jZIN73EDMmbk4VTv/rYLRKb4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=g0GHrUyuEnH4JhMh3Oi+EXl+akokDd17kjplJPl2cJZ5WwEMMbYw90TMF1uFfMEIj qOUjAgShaDEGVegHB/MRVxPcGQ26K3KhKWEIbQz/xUTvG1VxRuXZr6adEZ8RkaJx+A JPZhbtV4NAhu+eKiEU7auwhwa7PG0s6MDwu12fAE= From: "mail+gcc at nh2 dot me" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/24542] potential unwanted truncation of operation overflow should be warned on assignment to wider variable Date: Mon, 07 Aug 2023 11:00:56 +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: 4.0.2 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: mail+gcc at nh2 dot me X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 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=3D24542 --- Comment #15 from Niklas Hamb=C3=BCchen --- Another common integer overflow bug type is the "for (u32 i =3D 0; i < u64;= ++i)" pattern, as well as general widening comparisons. I filed bug 110933 for those; just linking it here for people interested in integer overflows.=