From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A7DB23857C6A; Wed, 22 Jul 2020 15:30:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7DB23857C6A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595431827; bh=BiLGYpjFHDsNZI7q01901MrT4GAfuY6hbTixKmWj2Zs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=g3sSynCXuy2Cnqze9Ju3CpFXUehn0JArGi9zcpwMmxbS4W683Xjr80aNq6XgPt87g 6EgLoG6c458uf9dZDbZFRcPU3JL9qDCZhY4B2dTunhjmU7D4k9Z2bnUDZlyUOvVOQe 478+wJG4n+HjnAer88wILE/EHX6R7B5T2qjSfino= From: "wjwray at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/92411] conformance issue with reinterpret_cast in constant expressions Date: Wed, 22 Jul 2020 15:30:27 +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: unknown X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: wjwray at gmail dot com 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jul 2020 15:30:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D92411 --- Comment #4 from Will Wray --- I mis-read this so was too hasty in suggesting "can be closed". The standard states that a expression evaluation fails to be a constant expression if it evaluates "reinterpret_cast" (i.e., by named token, not by the actual strength of cast required, so seems to be the intent). It's a 50/50 split with gcc & icc accepting, clang and msvc rejecting https://gcc.godbolt.org/z/drdT66=