From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 72E833858C53; Sat, 22 Oct 2022 20:56:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72E833858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666472197; bh=k5G6Z8ae/KNYQN+i249T9rHQnq5kjhhOagos4PeE55E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bFuWFw/8rsX9t8w8yeVdnpeQmZKG6Offj2x1paU5CuJUsHpobWSmpWQj77z/BnxN5 vzetdANij4o6honsxIvHhrNWQt27a44G0mw20Ka7veqHIpdujQRjIU++vF7oRHwRQI dpSWpZmEhjC+eZk1zA1J5AUYji3eO1mSJAydJ3A0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105774] Bogus overflow in constant expression with signed char++ Date: Sat, 22 Oct 2022 20:56:35 +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: 12.1.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105774 --- Comment #4 from Andrew Pinski --- And one for short: constexpr signed short f(void){ signed short x =3D 0x7fff; return ++x; } int main() { constexpr auto _ =3D f(); }=