From patchwork Tue Oct 1 21:39:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 98229 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2CC603860C3D for ; Tue, 1 Oct 2024 21:40:49 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 3A580385EC15 for ; Tue, 1 Oct 2024 21:40:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3A580385EC15 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3A580385EC15 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727818825; cv=none; b=fGou7HMj/PqTUpcrebuLVPrJ5U27A3oA7k8BmXbkZfYQlB+aOkztqCvNHmnMBjzUBF4V7Y1LoSjaMbCrn7K+dIT71La1bvwkgyJCYJ28T5dg3nQ1MuJs6ZcBsFMegi40gx57BqXOGVc0kXhR2AUSfIA0P0vpRt7znmvGRg2w6bw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727818825; c=relaxed/simple; bh=XsIvltyMm3Yey+1jG2MxDz5czzH2X3bNfClFe4KZ6jI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=w603AXIT9tPJhUJBubtCvPP3NZXMY+HBH2l55P/BySiOBXZsZtF73iWNTfjwVaRB7k/kvdRW41EH2Cb+TDYFJSK2vhxRdx7Ud6VF+zTRjgKL1YI/2JBCBv8ISNx34U3/SpD4dclmFFBHlWXkuAn22/9PxVzn/Dwad2lLDRkPa/I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727818824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ii6gyB4rgb2yOmzaxCDN9eJ4TH7Nlm5eOh39LGQ0qKo=; b=hYwbLXRg8PxIUp+3jeki6FIO8uX7YzRhQ6NVcFzzy6fYlZ4VK1oZnsnLdgzMRuMQBnMDuU hSnjIGljfryeT5x/LwcFfaxE5wYUqJdu5g+OAC0MAuyzwrhGOhcuOz3lSGmfUFtuR5OKiL CBxIuoJjFp5t40W2dWsE6lXlpRci+Uw= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-393-6JMfxk6cMISgiB-eGbBtew-1; Tue, 01 Oct 2024 17:40:22 -0400 X-MC-Unique: 6JMfxk6cMISgiB-eGbBtew-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6cb3fba42a1so4513886d6.1 for ; Tue, 01 Oct 2024 14:40:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727818821; x=1728423621; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ii6gyB4rgb2yOmzaxCDN9eJ4TH7Nlm5eOh39LGQ0qKo=; b=Xj1WvrwGky18i7X1pZDht967H/iamUDL11i/4mgg4lg79jUlF2Njf4L3s6tzRbZ0ua osvQHHLtDqBsWmQoXRxtFiaxo/6gdlLheZZYerjFHkoDN8rv/zhbI6K4Ah+u9abzgiMQ G0Ezod8FrzUg3Bm1t0iSdx7wG3YeT+BBSvVXvyWWxZ8naTe570Vwyd/c59Q/5iv73N9h v4tX/JpXz0gKrKttZ8SZ+tsgIk8InsAOCqkDxTKVrAPjrTgABs9pwvm7T9IlDfhj6g0R XqmzAfOt/IzF7XQsbNFlRKjr4e2mYmU/AXaWHcQOqfV51kVV21KzgB9JU8LMkXxkwZQ7 F+dA== X-Gm-Message-State: AOJu0YyoT9+LYZ8sWTY+b/975REkzE27PA+R3yIIBO4jFK/SI+rFoAKg hGIF6GaV77mLep+13MpCgWprpUTAqHUdpJ/ZfL2kXgtlaxdybkSYYyntzXCfgoGVtQTYy0RFVkn AcNfjpRaYPaKg3eBrG8hc37ev3l6VO7QhpY5NqGkIKPNDbA86uYXhATGL6zBQLbkAueTDeCB3JZ eCF+SyoWKX0gmAuerkpLen+jNXGQ6gsC061uU= X-Received: by 2002:a05:6214:3b86:b0:6c5:5388:6ecb with SMTP id 6a1803df08f44-6cb8168fa4bmr16699446d6.16.1727818821290; Tue, 01 Oct 2024 14:40:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGxqX+s3HwKJVOcTpGrwQ17LY7v30AXmWvWPn/v+XDM0hM0LBM8WJeL77/9ucs2x8MQYxGfg== X-Received: by 2002:a05:6214:3b86:b0:6c5:5388:6ecb with SMTP id 6a1803df08f44-6cb8168fa4bmr16699186d6.16.1727818820933; Tue, 01 Oct 2024 14:40:20 -0700 (PDT) Received: from jason-thinkpadp1gen4i.rmtusma.csb (130-44-146-16.s12558.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.146.16]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cb3b69421csm52948766d6.142.2024.10.01.14.40.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 14:40:20 -0700 (PDT) From: Jason Merrill To: gcc-patches@gcc.gnu.org Subject: [pushed] c++: don't advertise C++20 concepts in C++14 Date: Tue, 1 Oct 2024 17:39:37 -0400 Message-ID: <20241001214018.600327-1-jason@redhat.com> X-Mailer: git-send-email 2.46.2 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP 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~patchwork=sourceware.org@gcc.gnu.org Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- There have been various problems with -std=c++14 -fconcepts; let's stop defining the feature test macro in that case. gcc/c-family/ChangeLog: * c-cppbuiltin.cc (c_cpp_builtins): Don't define __cpp_concepts before C++17. --- gcc/c-family/c-cppbuiltin.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 1b7cfa715c6c02db6ef587c87757d7792fc43423 diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc index 73a07055a86..b37a4c09792 100644 --- a/gcc/c-family/c-cppbuiltin.cc +++ b/gcc/c-family/c-cppbuiltin.cc @@ -1102,7 +1102,7 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__cpp_deleted_function=202403L"); cpp_define (pfile, "__cpp_variadic_friend=202403L"); } - if (flag_concepts) + if (flag_concepts && cxx_dialect > cxx14) cpp_define (pfile, "__cpp_concepts=202002L"); if (flag_contracts) {