From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4422F3858426; Tue, 13 Feb 2024 10:55:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4422F3858426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707821707; bh=bLNq5XES8ecN9h8u8sVF5lgCEuzV0ISYruy2+p7vE8I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sw8EXNyKtz6tnSi1Yize8Kkm1syWcYEB98SVU0y4xcmgGllRlm8vphMeo+8Pk7I0B rEVfkIYLqN/UzDqKJuxh1FkUFHqD0vA6gHbYzX2r2CjN0W2J9Y0vYilSFczD2bpKx9 KWrz2DG91Dw5DAV0wMXTbpjRXmx0gk0RvESBts4A= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113658] GCC 14 has incomplete impl for declared feature "cxx_constexpr_string_builtins" Date: Tue, 13 Feb 2024 10:55:05 +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: 14.0 X-Bugzilla-Keywords: patch, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: acoplan 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=3D113658 --- Comment #7 from GCC Commits --- The master branch has been updated by Alex Coplan : https://gcc.gnu.org/g:0d810b7d133c72b7e62b294ffaaf131560ce2391 commit r14-8951-g0d810b7d133c72b7e62b294ffaaf131560ce2391 Author: Alex Coplan Date: Wed Jan 31 14:50:55 2024 +0000 c++: Don't advertise cxx_constexpr_string_builtins [PR113658] When __has_feature was introduced for GCC 14, I included the feature cxx_constexpr_string_builtins, since of the relevant string builtins that GCC implements, it seems to support constexpr evaluation of those builtins. However, as the PR shows, GCC doesn't implement the full list of builtins in the clang documentation. After enumerating the builtins, the clang docs [1] say: > Support for constant expression evaluation for the above builtins can > be detected with __has_feature(cxx_constexpr_string_builtins). and a strict reading of this would suggest we can't really support constexpr evaluation of a builtin if we don't implement the builtin in the first place. So the conservatively correct thing to do seems to be to stop advertising the feature altogether to avoid failing to build code which assumes the presence of this feature implies the presence of all the builtins listed in the clang documentation. [1] : https://clang.llvm.org/docs/LanguageExtensions.html#string-builti= ns gcc/cp/ChangeLog: PR c++/113658 * cp-objcp-common.cc (cp_feature_table): Remove entry for cxx_constexpr_string_builtins. gcc/testsuite/ChangeLog: PR c++/113658 * g++.dg/ext/has-feature2.C: New test.=