From patchwork Wed Jan 31 15:55:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 194826 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1982947dyb; Wed, 31 Jan 2024 07:56:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0d6GfKedS650onXUApp5kLRa3/C4RWsGLUUoJZKLYmbFZeyj7BEj60OOwarmMXGK2OxOo X-Received: by 2002:a05:6214:f6a:b0:68c:481a:433 with SMTP id iy10-20020a0562140f6a00b0068c481a0433mr2375019qvb.53.1706716568720; Wed, 31 Jan 2024 07:56:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706716568; cv=pass; d=google.com; s=arc-20160816; b=eU+SX+uA+XAus7eRHYbugH9ZTEBKRMy23Fbk6KfxoeETQIxtKjgs5YG5ZfOkOFTHXM yccRQ18/SieIJIe+Cnb0DdKbBnYxp/VDQMMwdh5y2bMqlpSderGQfhgqOWci6QAPNue1 FbgnbkpSmllGprJgx8OqRr2o0d9nF0lU+KRbIIZ3Adl/MpLJoMQFog4gvPUHLi5z4Z9y UjH0o68AgGLjEMp3oiD7eY26+iX2eV/wWXiFPca4YDJJZUMJ8F1bt11RP+ZdefQBpQq7 Peh7527Y0Q1Xjxmt5lg4t1r/eTTbeKryoTYDS6Cl2Y7Itlxi4FrNZ19ZScttqaT5XB0+ NKsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :content-disposition:user-agent:in-reply-to:mime-version:references :message-id:subject:cc:to:from:date:dkim-signature:arc-filter :dmarc-filter:delivered-to; bh=csQuLEb/lodT8ydzPv8H0J6RVKlVS5uMVxlpQ9zG1P4=; fh=lKHCKgoyecdRyyd5WH4M7AwCGbinC5HCRL1c19LXDgo=; b=dsADou+W0wIF1XF3iJMJR+27SOYjD9Eh8EVu2nLM2B4bLZAyN/o8xRAq5ryVucL0/d bTL0GuR2xaR2i+u3EtlT5ebzbrOP7wXFEYSphf4dDcz+6ztOZvFHW8LmYgEg7wmVzr8O Wc0SM+54BCqer371aBQWGFq1SrVQHDlA0xCGn2auIgDrLcitZcEQQfmNvt+MW3ebbS9/ AUtHJmSeSsN24+Xvvo6xPlynaNY8RCjxbzATqR6Kua1AtIrhqJo20+4Udx88iLXpzXuC Tsvr5NLTyoJtqbpRVLB4iSYiGgbFytV3FkAy+aSDKWH1D52N4aOn0DHv/6v24qkuMN35 zEBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="as/OKfiX"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCXrluLrt52W9TXGDc7UFMasAtnoD/WjN+K2SXrt0I9HuYgnzhvVQpZzGgMJTXtC74j9hZ2jrcWj0tW4RLDrsByyNAK+8w== Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id j22-20020a05620a0a5600b00783feb9410esi6512240qka.705.2024.01.31.07.56.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 07:56:08 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="as/OKfiX"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 685263858426 for ; Wed, 31 Jan 2024 15:56:08 +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.133.124]) by sourceware.org (Postfix) with ESMTPS id ED7AF3858C29 for ; Wed, 31 Jan 2024 15:55:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ED7AF3858C29 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 ED7AF3858C29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706716524; cv=none; b=XCamc0Bsvwct04MKQ0uGn0TLLvr8aGyqiqIOoRmsTBbJTtWbvUoxoblJgNgC0KLv+KcJnw8UFeNYh3fBN7WygAJgT3UWP4qKx8btn+Q83S0gHx4EWeIH2L30/zGo1xGbLA8Nvea01a/7WXF+uiDl8vHkbBUku9XX9GYiG+K6QB4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706716524; c=relaxed/simple; bh=lIZ/6I4TV73kDXbQkTjZnz2VGihxexBVnXR9OV63Ogg=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=qVD8IQzwoBZ6xCTriLisVKyk86TacSEnfh66wDBadU9P+vx5qvOo6qTODHsPydPb/7/YaCvYCl8DNQVi3GQPM8lnzlZ79UR//Rt+zOmftffWXjSs6HXS+CgDEJ1SOasQOfMmbic2L72Z3LaLCipdKoUNWks3IuVwKNCiaghNsYo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706716522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=csQuLEb/lodT8ydzPv8H0J6RVKlVS5uMVxlpQ9zG1P4=; b=as/OKfiXCXHi14lvTXWNknpZegqrpHn5ZkgHUty4D98ZfLdr5uyVjJhiM7/PAj1J4X+OqH 7X3vVGTcVyCT2iMhUoQTIMcJ67tg9ZoQPll60o0kalwt1WFrcgUI8uAEOhDStL9T4bf+yQ VXSfrZqWEbnMtjDHH2UQshEsBCi05BA= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-614-dUJldtXKNwOzdwu1ADUODA-1; Wed, 31 Jan 2024 10:55:21 -0500 X-MC-Unique: dUJldtXKNwOzdwu1ADUODA-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7853b039d45so89483185a.1 for ; Wed, 31 Jan 2024 07:55:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706716520; x=1707321320; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=csQuLEb/lodT8ydzPv8H0J6RVKlVS5uMVxlpQ9zG1P4=; b=Ngf3od4FQ/+93kb2KqM2FfqXAXYRnuapjOTfGwXJlbheO8z0QP21yMb/E3jrNkb03u 7JRr7E3qlJEcxoEvJ53REtvlJ7V5TEkcpOyMTOI6P8qwP42UHCHqYOQK7lUqLlw+IbQG 8CXeKAXbzzcaf8mBZkXpih5gvrfk7ghi1ulOfA/qV/4+3LFS5AIzbe/pDZp4hiemLOWD 8qXv3fuY/DqhVApqy2zM+qrM99JbK/l83iUyavebH0DnopJmjQMaWVHiw+JlwwvAiifc gXw1WwOJ4yL0QwiMkaX6KyF8UeKWwn1kl3lS23YQrYA8UC/qfSN9imnCGln01QNDLG/n bTYA== X-Gm-Message-State: AOJu0YwJOdt4VgJALxqy7eAdj4/RIFIiuBhPwJyJ13tDvH+4A7F95YC+ P8/SVwz7WFniv0VPZfn+NUZ5sXnplUvEQNpzlmAwITYVUtSIk4VMz6U/ZfEf315id6S390kFRrA nFU17ow6aKDayAfeJv5EaqF/8U53yOOEVyPeGieKhNTPYafMAZ7zWCcc= X-Received: by 2002:a05:620a:103c:b0:784:f2e6:e110 with SMTP id a28-20020a05620a103c00b00784f2e6e110mr1766895qkk.74.1706716520584; Wed, 31 Jan 2024 07:55:20 -0800 (PST) X-Received: by 2002:a05:620a:103c:b0:784:f2e6:e110 with SMTP id a28-20020a05620a103c00b00784f2e6e110mr1766873qkk.74.1706716520180; Wed, 31 Jan 2024 07:55:20 -0800 (PST) Received: from redhat.com (2603-7000-9500-34a5-0000-0000-0000-1db4.res6.spectrum.com. [2603:7000:9500:34a5::1db4]) by smtp.gmail.com with ESMTPSA id c17-20020a05620a0cf100b007840a2586cbsm1531171qkj.110.2024.01.31.07.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 07:55:19 -0800 (PST) Date: Wed, 31 Jan 2024 10:55:18 -0500 From: Marek Polacek To: Jason Merrill Cc: Richard Biener , GCC Patches Subject: [PATCH v2] c++: add deprecation notice for -fconcepts-ts Message-ID: References: <20240130231841.418861-1-polacek@redhat.com> <922c8f45-fbf4-4491-9b4f-1e75076848a0@redhat.com> MIME-Version: 1.0 In-Reply-To: <922c8f45-fbf4-4491-9b4f-1e75076848a0@redhat.com> User-Agent: Mutt/2.2.12 (2023-09-09) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789559332775431438 X-GMAIL-MSGID: 1789622032710945789 On Wed, Jan 31, 2024 at 08:53:00AM -0500, Jason Merrill wrote: > On 1/31/24 03:40, Richard Biener wrote: > > On Wed, Jan 31, 2024 at 12:19 AM Marek Polacek wrote: > > > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > > > -- >8 -- > > > We plan to deprecate -fconcepts-ts in GCC 15 and remove the flag_concepts_ts > > > code. This note is an admonishing reminder to convert the Concepts TS > > > code to C++20 Concepts. > > > > What does "deprecated in GCC 15" mean? Given you output the notice with > > GCC 14 it would be better to state when it's going to be removed - > > it's effectively > > "deprecated" right now then? Or will it continue to "work" forever > > until it bitrots? Sorry for the wrong choice of words. I meant deprecated now, removed later. > Agreed, it's deprecated now. We talked about it having no effect in GCC 15; > the message could say that. Or we could leave it vague and just say it's > deprecated. > > Please also update invoke.texi. Like this? -- >8 -- We plan to remove -fconcepts-ts in GCC 15 and thus remove the flag_concepts_ts code. This note is an admonishing reminder to convert the Concepts TS code to C++20 Concepts. gcc/c-family/ChangeLog: * c-opts.cc (c_common_post_options): Add an inform saying that -fconcepts-ts is deprecated and will be removed in GCC 15. gcc/ChangeLog: * doc/invoke.texi: Mention that -fconcepts-ts was deprecated in GCC 14. --- gcc/c-family/c-opts.cc | 5 +++++ gcc/doc/invoke.texi | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) base-commit: f7935beef7b02fbba0adf33fb2ba5c0a27d7e9ff diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc index b38a1225ac4..b845aff2226 100644 --- a/gcc/c-family/c-opts.cc +++ b/gcc/c-family/c-opts.cc @@ -1139,6 +1139,11 @@ c_common_post_options (const char **pfilename) if (cxx_dialect >= cxx20 || flag_concepts_ts) flag_concepts = 1; + /* -fconcepts-ts will be removed in GCC 15. */ + if (flag_concepts_ts) + inform (input_location, "%<-fconcepts-ts%> is deprecated and will be " + "removed in GCC 15; please convert your code to C++20 concepts"); + /* -fimmediate-escalation has no effect when immediate functions are not supported. */ if (flag_immediate_escalation && cxx_dialect < cxx20) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index eb931b984e8..ca2c0e90452 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -3204,7 +3204,9 @@ the language standard, so @option{-fconcepts} defaults to on. Some constructs that were allowed by the earlier C++ Extensions for Concepts Technical Specification, ISO 19217 (2015), but didn't make it into the standard, can additionally be enabled by -@option{-fconcepts-ts}. +@option{-fconcepts-ts}. The option @option{-fconcepts-ts} was deprecated +in GCC 14 and may be removed in GCC 15; users are expected to convert +their code to C++20 concepts. @opindex fconstexpr-depth @item -fconstexpr-depth=@var{n}