From patchwork Tue Nov 23 19:22:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 48040 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 020E23858421 for ; Tue, 23 Nov 2021 19:23:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 020E23858421 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1637695410; bh=D4mlAM7nKKJ+ROEVM8/IiBURv9tNfIx2v344CLTM6xA=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=xhIv0PXsQpvPB9IyraO8r5ZtESGAJIHg8bZ9lRHamq0W6WR9SwNwFH0wICKPTyNol aMapAV4E2Bj8nNSk8jDx0nlN7yYLkDKo2rqZ48f1nm6rn3/tP4U+a7xR8ESSiZHnYW cVQLAaoc9JgwiVg/YHkoJuDIqgI/nxvnrQE+eWCE= 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 ESMTPS id 6BD8F3858D28 for ; Tue, 23 Nov 2021 19:22:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6BD8F3858D28 Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-361-QLGfjqvDOnmyFuixPVzsTw-1; Tue, 23 Nov 2021 14:22:48 -0500 X-MC-Unique: QLGfjqvDOnmyFuixPVzsTw-1 Received: by mail-qt1-f200.google.com with SMTP id k1-20020ac80c01000000b002a79e319399so227669qti.8 for ; Tue, 23 Nov 2021 11:22:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=D4mlAM7nKKJ+ROEVM8/IiBURv9tNfIx2v344CLTM6xA=; b=0ALwG+SuejdvhNoyOaivJCw6cuaRLGs0G1YNdEKd9kWpZBPyWXH4Kn76o1HRGvmvzW Dw7l/qw/luoheTXBLXEKyKzfAv9khXQzO1gv/JOLeCUZCxdJSVNj0syoJOGFtpHuGgK2 osi9lIamtKMuAfPSHgGdnD1ajMR1ISAbP4CLdM75U4EEvBth1cOBkP6sM2N64Cgyp1MH YmV7X0RjsuVUqXkzLZQPdIdMUPUDJeJiqOGb3vl3R74Z9gFv69jVI3Sk9TywFIJ8p+pH wQZTHMwi+6PWzIuVxWYhX7hDE2+c1jXYfYA2Av9IOq2H6smWGrc+6YhLS4Zn5VpFLOUh 0scw== X-Gm-Message-State: AOAM531GNm4oUysohGoTAFFIFCuYhPJtzsKOIe4150xRICIdyp+fVz4i VPyeURQvrGRbeID8g1zsXjfw/YlEPv+FYzdAjHDLi1VqSusjJmI2iG/5Fq+iyFQGtEJKmH9mBz0 F5w0lc9KYLVdlZmAt0f54Y1xsk8u8nEloFQVCRodjJqgn1GGLRnbIhwgzXYy9X119Y+q8 X-Received: by 2002:a05:622a:24b:: with SMTP id c11mr9294401qtx.19.1637695367669; Tue, 23 Nov 2021 11:22:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCzHT4pCX6qV19UIEEupiLXqYXpnOKxHrWC4CQcRyDSFY1EGeREo+phZnfJcEBjFZdVQ240g== X-Received: by 2002:a05:622a:24b:: with SMTP id c11mr9294356qtx.19.1637695367285; Tue, 23 Nov 2021 11:22:47 -0800 (PST) Received: from redhat.com ([2601:184:4780:4310::aac2]) by smtp.gmail.com with ESMTPSA id u17sm6982707qki.2.2021.11.23.11.22.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 11:22:46 -0800 (PST) Date: Tue, 23 Nov 2021 14:22:45 -0500 To: GCC Patches Subject: [wwwdocs] Document new C++ features in GCC 12 Message-ID: MIME-Version: 1.0 User-Agent: Mutt/2.1.3 (2021-09-10) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-13.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, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Marek Polacek via Gcc-patches From: Marek Polacek Reply-To: Marek Polacek Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" I've reviewed all the C++ patches that have gone into GCC 12, and documented the ones that seemed most interesting/relevant to our users. Additionally, I've also added links to the proposals/PRs/git commits so that it's easier to find out more. I've also updated our C++ DR table. Validates, pushed. --- htdocs/gcc-12/changes.html | 129 +++++++++++++++++++++++++---- htdocs/projects/cxx-dr-status.html | 10 +-- 2 files changed, 119 insertions(+), 20 deletions(-) base-commit: e8cffe6d8fa529066a3e012599f9f417ddf0e855 diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 89cbbdd8..49be40fd 100644 --- a/htdocs/gcc-12/changes.html +++ b/htdocs/gcc-12/changes.html @@ -143,13 +143,19 @@ a work-in-progress.

C family

  • Support for __builtin_shufflevector compatible with - the clang language extension was added. -
  • + the clang language extension was added. +
  • Support for attribute unavailable was added.
  • +
  • A new built-in function, __builtin_assoc_barrier, was added. + It can be used to inhibit re-association of floating-point + expressions.
  • New warnings:
    • -Wbidi-chars warns about potentially misleading UTF-8 - bidirectional control characters. The default is -Wbidi-chars=unpaired. -
    • + bidirectional control characters. The default is + -Wbidi-chars=unpaired + (PR103026) +
    • -Warray-compare warns about comparisons between two operands of + array type (PR97573)
  • Enhancements to existing warnings: @@ -159,7 +165,8 @@ a work-in-progress.

    -Wno-attributes=ns:: to suppress warnings about unknown scoped attributes (in C++11 and C2X). Similarly, #pragma GCC diagnostic ignored_attributes "vendor::attr" can - be used to achieve the same effect.
  • + be used to achieve the same effect + (PR101940)
@@ -168,23 +175,115 @@ a work-in-progress.

  • Several C++23 features have been implemented:
      -
    • P1938R3, if consteval
    • -
    • P0849R8, auto(x): decay-copy in the language
    • -
    • P2242R3, Non-literal variables (and labels and gotos) in constexpr functions
    • -
    • P2334R1, Support for preprocessing directives elifdef and - elifndef
    • -
    • P2360R0, Extend init-statement to allow alias-declaration
    • -
    • DR 2397, auto specifier for pointers and references to arrays
    • +
    • P1938R3, if consteval + (PR100974)
    • +
    • P0849R8, auto(x): + decay-copy in the language + (PR103049)
    • +
    • P2242R3, Non-literal variables (and + labels and gotos) in constexpr functions + (PR102612)
    • +
    • P2334R1, Support for preprocessing + directives elifdef and elifndef + (PR102616)
    • +
    • P2360R0, Extend init-statement + to allow alias-declaration + (PR102617)
    • + +
    • DR 2397, auto specifier + for pointers and references to arrays + (PR100975)
  • Several C++ Defect Reports have been resolved, e.g.:
      -
    • DR 1227, Mixing immediate and non-immediate contexts in deduction failure
    • -
    • DR 2397, auto specifier for pointers and references to arrays
    • +
    • DR 960, Covariant functions and + lvalue/rvalue references
    • +
    • DR 1227, Mixing immediate and + non-immediate contexts in deduction failure
    • +
    • DR 1315, Restrictions on non-type + template arguments in partial specializations
    • +
    • DR 2082, Referring to parameters + in unevaluated operands of default arguments
    • +
    • DR 2351, void{}
    • +
    • DR 2374, Overly permissive + specification of enum direct-list-initialization
    • +
    • DR 2397, auto specifier + for pointers and references to arrays
    • +
    • DR 2446, Questionable type-dependency + of concept-ids
  • +
  • New command-line option -fimplicit-constexpr can be used to + make inline functions implicitly constexpr + (git)
  • +
  • Deduction guides can be declared at class scope + (PR79501)
  • -Wuninitialized warns about using uninitialized variables in - member initializer lists
  • + member initializer lists (PR19808) + +
  • -Wint-in-bool-context is now disabled when instantiating + a template (git)
  • +
  • Stricter checking of attributes on friend declarations: if a friend + declaration has an attribute, that declaration must be a definition. + Moreover, a C++11 attribute cannot appear in the middle of the + decl-specifier-seq. + (PR99032)
  • +
  • New warning options for C++ language mismatches: + -Wc++11-extensions, -Wc++14-extensions, + -Wc++17-extensions, -Wc++20-extensions, + and -Wc++23-extensions. They are enabled by default + and can be used to control existing pedwarns about occurences of + new C++ constructs in code using an old C++ standard dialect.
  • +
  • New warning -Wmissing-requires warns about missing + requires + (git)
  • +
  • The existing std::is_constant_evaluated in if + warning was extended to warn in more cases + (PR100995)
  • +
  • -Waddress has been enhanced so that it now warns about, for + instance, comparing the address of a nonstatic member function to null + (PR102103)
  • +
  • Errors about narrowing are no longer hidden if they occur in system + headers
  • +
  • Ordered comparison of null pointers is now rejected + (PR99701)
  • +
  • Anonymous structs with bases are now rejected + (git)
  • +
  • The compiler rejects taking the address of an immediate member function + (PR102753)
  • +
  • The compiler has support for C++20 + __cpp_lib_is_pointer_interconvertible and + __cpp_lib_is_layout_compatible to help the C++ + library implement P0466, + Layout-compatibility and Pointer-interconvertibility Traits + (PR101539)
  • +
  • Memory usage of constraint subsumption has been improved + (PR100828)
  • +
  • constinit thread_local variables are optimized better + (PR101786)
  • +
  • Support for C++17 std::hardware_destructive_interference_size + was added, along with the -Winterference-size warning + (git)
  • +
  • Many bugs in the CTAD handling have been fixed + (PR101344, + PR101883, + PR89062, + PR101233, + PR88252, + PR86439, + PR98832, + PR102933 ...)
  • +
  • Several issues with constrained variable templates have been fixed + (PR98486)
  • +
  • The compiler performs less instantiating when doing speculative constant + evaluation + (git)
  • +
  • Various diagnostic improvements; e.g., a more precise caret location for + pointer-to-member expressions

Runtime Library (libstdc++)

diff --git a/htdocs/projects/cxx-dr-status.html b/htdocs/projects/cxx-dr-status.html index 74aaa2c8..8f750892 100644 --- a/htdocs/projects/cxx-dr-status.html +++ b/htdocs/projects/cxx-dr-status.html @@ -6749,7 +6749,7 @@ 960 CD2 Covariant functions and lvalue/rvalue references - ? + 12 @@ -9234,7 +9234,7 @@ 1315 CD4 Restrictions on non-type template arguments in partial specializations - ? + 12 PR77781 @@ -16652,7 +16652,7 @@ 2374 C++20 Overly permissive specification of enum direct-list-initialization - ? + 12 @@ -17156,7 +17156,7 @@ 2446 C++20 Questionable type-dependency of concept-ids - ? + 12 @@ -17492,7 +17492,7 @@

This page is currently maintained by polacek@redhat.com.

Last update: -Fri Nov 5 11:06:02 AM EDT 2021 +Tue Nov 23 12:36:13 PM EST 2021