From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AE3C53858D35; Tue, 29 Nov 2022 18:59:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE3C53858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669748349; bh=4zSxrlKRJ/bch+FjjnUYB2ADX11+TVp2gEXYEBaVLjo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hGltOj9MlDJL79sAJ+34KA420B1uI0Yn0e+KqYfiFAihxu/70zJimTxK71PLu1xp9 fSlL8WPbr8TAQJ8+B6FBtwI5pFxg4IkIPgU3T8dv9nF+jEl1uacFlmWKrZ6c7wQbQ7 oj6lumHaL4/y1CFhBeNvmwBHUCFI8Zm3du8bXPfM= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107846] [13 Regression] error: result of '8000 << 8' requires 22 bits to represent, but 'short int' only has 16 bits Date: Tue, 29 Nov 2022 18:59:09 +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: 13.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D107846 --- Comment #8 from Jakub Jelinek --- (In reply to James Hilliard from comment #7) > (In reply to Jakub Jelinek from comment #6) > > Created attachment 53984 [details] > > gcc13-pr107846.patch > >=20 > > Untested fix. >=20 > This appears to fix error, the warning is still present: > progs/test_tc_tunnel.c: In function '__encap_ipv4': > progs/test_tc_tunnel.c:228:31: warning: taking address of packed member of > 'struct v4hdr' may result in an unaligned pointer value > [-Waddress-of-packed-member] > 228 | set_ipv4_csum((void *)&h_outer.ip); > | ^~~~~~~~~~~ That is unrelated and why do you think it is wrong? I don't think that war= ning has false positives.=