From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD87C382FCA4; Thu, 24 Nov 2022 17:57:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD87C382FCA4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669312671; bh=l9apV5Z5sXE4iVH4r6DUqhjDge4+n8f5TpavdgeVpnc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wlV/dNJW0JPr7YX4va2vGZfH2PrJZzFNkpRITX23AmNA6V1M805/5xx8w8KqATIa1 TNQ910cdbN2Eu7R6g0y1F/aRmqJsDCgeYl4S2YZk1viCxsFKU1wrDKl/VztWD34h/E GbBfU51b99yYF9qE4W1+kU2oBRC+gGV2bMJ4jVsI= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107861] C++ static_assert() does not honor -fwrapv, leading to compilation error Date: Thu, 24 Nov 2022 17:57:51 +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.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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=3D107861 --- Comment #2 from Andrew Pinski --- Note clang rejects even just: #include #define wrap_inc(x) ((x) + 1 < (x)) constexpr int int_max =3D INT_MAX; bool b0 =3D wrap_inc(int_max);=