From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99363 invoked by alias); 19 Apr 2017 17:07:39 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 99331 invoked by uid 89); 19 Apr 2017 17:07:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=late X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Apr 2017 17:07:37 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 87790DDB24; Wed, 19 Apr 2017 17:07:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 87790DDB24 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jwakely@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 87790DDB24 Received: from localhost (unknown [10.33.36.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3860E17101; Wed, 19 Apr 2017 17:07:37 +0000 (UTC) Date: Wed, 19 Apr 2017 17:07:00 -0000 From: Jonathan Wakely To: gcc@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Deprecating arithmetic on std::atomic Message-ID: <20170419170736.GY3412@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017-04/txt/msg00062.txt.bz2 I know it's a bit late, but I'd like to propose deprecating the libstdc++ extension that allows arithmetic on std::atomic. Currently we make it behave like arithmetic on void*, which is also a GNU extension (https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html). We also allow arithmetic on types such as std::atomic which is probably not useful (PR 69769). C++11 and C++14 were silent on the matter, but C++17 makes it explicitly ill-formed (see https://wg21.link/p0558r1 page 2). I'm implementing that for C++17 mode but would like it to be ill-formed for all modes in a future release. So I'd like to apply this patch to the gcc-7/changes.html page: --- htdocs/gcc-7/changes.html 17 Apr 2017 22:12:35 -0000 1.77 +++ htdocs/gcc-7/changes.html 19 Apr 2017 17:05:27 -0000 @@ -38,6 +38,10 @@
  • The Cilk+ extensions to the C and C++ languages have been deprecated.
  • + +
  • The extension allowing arithmetic on std::atomic<void*> + and types like std::atomic<R(*)()> + has been deprecated.
  • Does this seem reasonable, or do people think we need to keep this feature, to match the core language extensions?