From patchwork Fri Feb 2 10:27:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 1894465 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=lmBUP4Sl; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=lmBUP4Sl; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TRBpF1cCBz1yQ0 for ; Fri, 2 Feb 2024 21:29:09 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0C2EC3857BB1 for ; Fri, 2 Feb 2024 10:29:07 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2045.outbound.protection.outlook.com [40.107.20.45]) by sourceware.org (Postfix) with ESMTPS id DCEEB3857B93 for ; Fri, 2 Feb 2024 10:28:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DCEEB3857B93 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DCEEB3857B93 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.20.45 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1706869720; cv=pass; b=EjyQE51ORM0MKxD1DqMGee5ep1/nzWS678T6Z97rEMDquUr6pS68ncgjVd/k5k2dp2UCJavcqVJSzZsRVAPdg+lPWYZVAuLKZia1t5ft9XZNdmnpQcf45Xsu9ywUU8p1FEKLRhOkVJxsy0+mnUwEatg5qa5oHv+wsENPP4QrgAI= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1706869720; c=relaxed/simple; bh=WMt6Ab05s2qzbekj9b+I/MkFJl3YcCeRMTxH6x46JV8=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=s8ONdj4+Sciu3dHZAfJiD3hFX7PJlzfuQ/e0Obi78Mi9ZlExE6nD8d3RBQHnumChBB9RUhZxLnGVo64Xf8LDU9lmEQCm6JNNjiHMiJI2KmPOiyZxOAD8jtunS4CxGdH2lAm1qUpExNnFZnDeITKOqwNgs5AHPerJp1YltQ0lfSM= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=CaZRLLUTwt1sN1AwFbdI+LEF1woxyAugSe9ChEc+lY5aeC9Gl5LC96GSUvqHTWdd4shEqaMEg59Y9aE0LyUyoMpRdomyP7deyQcCeKmFTYNzOi3rQsLh32LHr662SDOQUTbOrwPmKJGlevw/aXgAIaNzd10xWzdqslzcjSlr3psHuE5556mMY36ammMWzu0/zS6Tg57l/VhYSXbGbADmI788aO/anFXsynJpd4BnGbNL2XjnDYgP6d1Bc9UqQAYPNL2hf2V/Gc4QPNB8V/YQU/ADNdcw9BT7wxibPeef3+yXG0hvq7tsb4PrU4PlkAi+oLCuczXZQvXfMqVm9zablA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZY/D4wBrjYW0HuGeaEBugbD5LKeJYgtjUM9FnOUbseA=; b=f9vl+bN0wXW8u4VBFsVYjCBvaz150O2qohdf2cuplJqD3+X/vSL5eo656mu7wzUArIl46hLIBhKM2ee4obJtMNHB6Qoe5TyaVJbCh7mB8vj9CJ4QW/m8wyyqB6cFEVTqAaxID6Acyd3/AfRE6YCssK9zdjUCuL9b4vxHaS6/aH/lzS6g67jolYyzQowSxIMdT4xJ4MUnXMo+5NJA7MB4xBbYCB5cX9qz4w4ceJHXPi+zWszwP4F+XKrpSC2+rK5NisCesQbSyv5z8jyo/e1MVIcKrtaxAMZnX+4ReRmSCJnzjtvuypv4WIO1DBpBms6eWlKuvd82eA4pzxZWGG8aQw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZY/D4wBrjYW0HuGeaEBugbD5LKeJYgtjUM9FnOUbseA=; b=lmBUP4SlZEfCwberGxB3bFWK+g2MCtaJQRAKQ260MVbt/nLDNUoQeamsMklieY6F4yskKGv1IkzGEyXH0vpnm5Gvwlt3x2gCiiuCN+P0CCUFmA6+v7pnHViWSS+0zQuX0p326GhLCUQ6l+1Q4B2I+qVMDJwwCHiA4BqCtjpfFLo= Received: from DUZPR01CA0043.eurprd01.prod.exchangelabs.com (2603:10a6:10:468::6) by AM8PR08MB6610.eurprd08.prod.outlook.com (2603:10a6:20b:36a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.30; Fri, 2 Feb 2024 10:28:32 +0000 Received: from DU6PEPF0000B622.eurprd02.prod.outlook.com (2603:10a6:10:468:cafe::fa) by DUZPR01CA0043.outlook.office365.com (2603:10a6:10:468::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.24 via Frontend Transport; Fri, 2 Feb 2024 10:28:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DU6PEPF0000B622.mail.protection.outlook.com (10.167.8.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Fri, 2 Feb 2024 10:28:31 +0000 Received: ("Tessian outbound a064b9944658:v228"); Fri, 02 Feb 2024 10:28:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a19dbf178a55a979 X-CR-MTA-TID: 64aa7808 Received: from 8c3958bf6db9.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 389F229E-EFF8-49C7-824A-3EABB3EA0C7C.1; Fri, 02 Feb 2024 10:27:29 +0000 Received: from EUR02-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8c3958bf6db9.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Feb 2024 10:27:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GC6IpYxtxL7XKIGGl426r+jwBAvsqANhDquFQasdYX77qAl6JdOTEyqSP63c+kGlat81V7geT5g34Sco8ZznLyO5VtG1ZLyx+YqeYWeI7YqyQ9CRYT26LwVolCoP2iRPE06YaIj+NSJQRPmI/in6mncuf1GulJHrd3SsZwFRdSCGw4DHfUwJ3B8HRzh2DTsqVDOhwHFSmz3UrXD8EIhP7kve2pBF6BbsqAzaZwHzpRVOAvb7AeAAAcg1WaiprymyR9vmAs4aRz2q0gkf77rXIZh0aYJ4fBUwZJdvpFahcOg2q6MW40UiYOKQySyD8fSYKD856zhv1agfZzD6s4zYNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZY/D4wBrjYW0HuGeaEBugbD5LKeJYgtjUM9FnOUbseA=; b=SvWF6gMgpn0JKU4hS21znVgdBmglraTIS8bsVbXmhJXwUrjilpKr89Qm7v3FEVqMvV2JZQUm/5yk5Z3HnIGLraTi52XyJ9+rpppBwX3MWNhcnNhqx6rJNTgFFyZWRJ55L8hd604HJEb3jhgzPdPWz36waSQZBBZ2DCWRKI61F6kRwna+bFU6UTpM3FH1hSVX1F9i+tnyYkWJ7MmsdudmLsSgotZ/zoxykj8cAnBW7IMm/MYXr9GTaL82GKI9h+NonwFSY1TD3u/iH4h6i+zsGaMfAmtWg8tp8j+sHvnNZcXTTMaFUPHIOG5GUel0EoIrnjIYL9e5VCCVT/5S9awVLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZY/D4wBrjYW0HuGeaEBugbD5LKeJYgtjUM9FnOUbseA=; b=lmBUP4SlZEfCwberGxB3bFWK+g2MCtaJQRAKQ260MVbt/nLDNUoQeamsMklieY6F4yskKGv1IkzGEyXH0vpnm5Gvwlt3x2gCiiuCN+P0CCUFmA6+v7pnHViWSS+0zQuX0p326GhLCUQ6l+1Q4B2I+qVMDJwwCHiA4BqCtjpfFLo= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) by VI1PR08MB10148.eurprd08.prod.outlook.com (2603:10a6:800:1bc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.23; Fri, 2 Feb 2024 10:27:26 +0000 Received: from PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::48ca:fbcb:84bf:ed17]) by PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::48ca:fbcb:84bf:ed17%4]) with mapi id 15.20.7249.024; Fri, 2 Feb 2024 10:27:26 +0000 Date: Fri, 2 Feb 2024 10:27:23 +0000 From: Alex Coplan To: gcc-patches@gcc.gnu.org Cc: Jason Merrill , Nathan Sidwell Subject: [PATCH] c++: Don't advertise cxx_constexpr_string_builtins [PR113658] Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P123CA0491.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1ab::10) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|VI1PR08MB10148:EE_|DU6PEPF0000B622:EE_|AM8PR08MB6610:EE_ X-MS-Office365-Filtering-Correlation-Id: 6bb9e5ff-a45c-4ad2-ca8d-08dc23d9b431 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: whYvjRUh1Ou/XzfntWZSwDUTat5LEus//Nc75eXPxorKv0g9obZHAM9No4ONzO9g7qw6lNR4Zkk54YbVwv/p8OKP+XdaS+8XQ4y4EHIQp0yOQXtd1TAnlPOKY4lekrK/3KN3i+OUv8bqNRnx6q0X1gLbGmPIwLulCtugrE0NV6nq2K8X8FMubiMpu9boxjKrVr+qh2sIMhuNy58PdUi1STijv2EP3LrjaF2GI4nfV4RPvZ3+JVjZBZLHO/0Brk+p9Xcs7PwOZTklDf/1+YLoAS/wGed6EowuFjNNbzYUkC7kXbhpntsaVecEosbMMgndjB1QNOjKdiCto+bxliia+7VfB3W3ofTAMRHWqWV3yi3Oer+xcWoOYc4uDW5TpXEgu3HXwWGZv5UQc88xtNz4VKzS7vmNjxSunMba9AWMY5XIP8yYANC7dAZw1ezDAX933dEpGPTrh9ygbWYa0+4iKut0WG+kNUCL/mxlPZJXZrKlZRKA/W9EpmHRv4oC79SNBH3n1HByKLQ9vf1ZTEgMM1nYpqymAGGSRm4WYrRbuMLVBSgvdT8q+7/+KqdIOMm8ZkgPp/p81gg06KEsKHRZJXDb5dZCDYuNeNJuWBQqedvtE7N3d4QKZYeE8BMhejH1 X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8958.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(39850400004)(366004)(136003)(396003)(346002)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(2616005)(83380400001)(478600001)(26005)(966005)(6486002)(41300700001)(44144004)(33964004)(21480400003)(6506007)(6666004)(4326008)(6512007)(36756003)(8936002)(66946007)(316002)(66556008)(6916009)(44832011)(66476007)(54906003)(2906002)(235185007)(38100700002)(8676002)(5660300002)(86362001)(2700100001)(67856001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB10148 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU6PEPF0000B622.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6fd4f205-04ff-4014-e8a7-08dc23d98d28 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oFSWDffyYAVKWDdSZcbMegiCETXqPJIZZxQpQ1MHS8gBTzFAhan1npCAxj71DjY+GVHMBgYbTWURA4wjOFewrEmqaeDrXRLzz++UvpDrWwhzjOerGU9gMpfh7a7cm1Wy/buSXQlZSZ9YBQUeYU6gW6DpNvl4ocWRiIw0uWIDPEqsMceezwJ9AKsReXsN1YHXIV7JIvPXHGr8HEzs3FGX80jjmKkLYhh9yn2k+ypT7pfHEO5COmoTPieEkAoZ513DmruAtf3ILa4ntkXfUwQsZkpLRRrQ4tzVUZAWfV6mqskdW+jQqTA6Dh/DD25zn+CtCX+dXQ/A7Ny2cmjLi4c612RZPF5nu1Zx+n2GrASNbGKOBng9yhxiDEw/aPmgiCUzeUBNzVoV4uoEF6Vmr9btaJmbbhcZRkJ3XCHWu8tKR3hw0oZVWb1rKo+y1jQamDXcRiN5h2EnH2QenNaJdDZMN0oP0muzxF8IbntnqB2vXsw0XuTfJEXH8WZ26vbb5Q6j8QWFyo6q82OixZablDGDySzRTedgRvPe94KXngTHGQInUZsdjy22sEtTz4utJp7NBP/uGV03SXEqXPDCf6bWhlKtPMQB+uW4tRQvUMEhu7Yfd8CkAArA8hpHEpXQQHEvScEbtBFSXP9LKJ1JLSy2I9/ZVtJtGCCyxhPeoLDkXfCeimXEi+NXtdEHsl1uwknsBlWMqMitBuwFLe/kRk+E4iq8M2IN8IzurP1lvDMqXhWIR2qglhz2OR6tLlhUPMjW5UCCYSPya3XjTgyuIny0OdsMy0CiCCX+hzZxtWHrdoE= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(376002)(396003)(136003)(39860400002)(230922051799003)(64100799003)(186009)(82310400011)(451199024)(1800799012)(46966006)(40470700004)(36840700001)(40480700001)(40460700003)(2906002)(235185007)(5660300002)(44832011)(86362001)(6916009)(316002)(6666004)(70586007)(54906003)(70206006)(8676002)(8936002)(4326008)(82740400003)(356005)(478600001)(41300700001)(6486002)(36756003)(6506007)(83380400001)(2616005)(6512007)(47076005)(36860700001)(33964004)(44144004)(21480400003)(966005)(81166007)(26005)(336012)(2700100001)(67856001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 10:28:31.7492 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6bb9e5ff-a45c-4ad2-ca8d-08dc23d9b431 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DU6PEPF0000B622.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB6610 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, LIKELY_SPAM_BODY, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Bootstrapped/regtested on x86_64-apple-darwin, OK for trunk? Thanks, Alex -- >8 -- 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-builtins 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/pr113658.C: New test. diff --git a/gcc/cp/cp-objcp-common.cc b/gcc/cp/cp-objcp-common.cc index f06edf04ef0..85dde0459fa 100644 --- a/gcc/cp/cp-objcp-common.cc +++ b/gcc/cp/cp-objcp-common.cc @@ -110,7 +110,6 @@ static constexpr cp_feature_info cp_feature_table[] = { "cxx_alignof", cxx11 }, { "cxx_attributes", cxx11 }, { "cxx_constexpr", cxx11 }, - { "cxx_constexpr_string_builtins", cxx11 }, { "cxx_decltype", cxx11 }, { "cxx_decltype_incomplete_return_types", cxx11 }, { "cxx_default_function_template_args", cxx11 }, diff --git a/gcc/testsuite/g++.dg/ext/pr113658.C b/gcc/testsuite/g++.dg/ext/pr113658.C new file mode 100644 index 00000000000..f4a34888f28 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/pr113658.C @@ -0,0 +1,13 @@ +// { dg-do compile } +// { dg-options "" } + +// PR113658: we shouldn't declare support for cxx_constexpr_string_builtins as +// GCC is missing some of the builtins that clang implements. + +#if __has_feature (cxx_constexpr_string_builtins) +#error +#endif + +#if __has_extension (cxx_constexpr_string_builtins) +#error +#endif