From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 7E8ED3849ACC for ; Wed, 10 Apr 2024 21:26:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E8ED3849ACC 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 7E8ED3849ACC 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=1712784399; cv=none; b=Y+hJMOW2hjL36d6Rn/9/og+uVqN+d0imJrTCWbEAW1QDfPj6b8K505qsc/+SlST5UeLDcl9Bx/W1SK2tQUYRfPsVaRyKSgevLjGJNrmMrzTNATStKY8fyTLBc0i7UwHaH0rtyWdnIelxo3ZA2xTr+XJBSuGSQqg5JVfQ4OHvCzM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712784399; c=relaxed/simple; bh=fIOPvH833FUVKp9IfKFimfG9Py4Pfcd1o5bGh2Xh5+Q=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=F7xP/Hw9Ru5lTJv2uexOOC4MJFvCa9GjWd58yz90NHtmQnWTcTO6LVR1CVzHKpWhoAVwEN4kG1EIc97lN3HVWpY3pdkxThETMYRFF4gIBJg0c4WIWCXrvfhIKUEcBNDXoj9LXIiXjOWsF0LzI56BDMGEFtBtYD+tXfJleewQRr0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712784389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=XHaBjYhPjlhNQt3mnqtaUq9ZRsiPnKg64He+j42BE0M=; b=U7ANpcHpCb7T3N4QVkByvGg8t1zXOiLgXF/AyhMs5u/XO9OqYeeL5/gqROg0T5DFVtkz2b ak7jrhlpti9uRLlqHeL9Cbcz4Jt8iCrIl34MOg89JmBhbbvX2iVhTRGfdN5syAbT7dlBHT okV05d/ojnf7fkw2qw9vtckhxdptS88= Received: from mail-yb1-f197.google.com (mail-yb1-f197.google.com [209.85.219.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-79-Gse4lm7pOYiCmdbKzZ_5WQ-1; Wed, 10 Apr 2024 17:26:27 -0400 X-MC-Unique: Gse4lm7pOYiCmdbKzZ_5WQ-1 Received: by mail-yb1-f197.google.com with SMTP id 3f1490d57ef6-dc74ac7d015so9058452276.0 for ; Wed, 10 Apr 2024 14:26:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712784386; x=1713389186; h=user-agent:content-disposition:mime-version:message-id:subject:to :from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XHaBjYhPjlhNQt3mnqtaUq9ZRsiPnKg64He+j42BE0M=; b=j/hC40gT6q7Mps5XA+mfpsyIVmqD7gAW4ZxFdyeBf1xBc5TCPPKG9rbiIXyAUkMWAs hU9ug65SUkKW/eCZHVFiT/LUimBe5gMVmoAcFMqCvHQQTDsieT80T9zVfvX34RoQhNMa APg/fMv1q3TYwirsGr9pnfrpdARMP52MWOnG5Nvd1Q5DoLOZ+Zji4wPYkwUwTOtb29hl 9kn00CakNycQShAbnRDUrf8zxuQ2IcrpLrRB/5OtIivT3T4ntc6fqTdlOFp1tK+DLdF0 upf7tJyki5MVCmX2ZunsUb2bVcyJbQDR3vgrdR92azv9q5VzNOLXqQpgvw/4tJUqa9qn Hsxw== X-Gm-Message-State: AOJu0YyW4ZPr0tyusymon5oAxQ2DIaYdSZPY2rXzBQReZ8T5NrU0invV dWUKoopUQqDLHYywOJdKh+eUUingJAILGHC0B+CWvHXuk394l5dLfxjINPbxsXQ2Z+r94Mx9zly KOPbzOBVKO1BHxC1VKMhVihdMqE1T6G4hqpl7uU83NIPrgps3U/qU5NcLqG6VocsWfOiQJvNXKV CF3G2HFID/wxeof3ytgX6u8+6qpL8qcE1JF/OhyQ== X-Received: by 2002:a05:6902:f89:b0:dcf:bc57:cd61 with SMTP id ft9-20020a0569020f8900b00dcfbc57cd61mr4298826ybb.50.1712784386292; Wed, 10 Apr 2024 14:26:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE1d3s8Z4gsEJmAKqTYDnbsnVCF8myuzCw0MPcpHy8tntiQvxYP7gs9nQgN0/QsyIp4RqV7xQ== X-Received: by 2002:a05:6902:f89:b0:dcf:bc57:cd61 with SMTP id ft9-20020a0569020f8900b00dcfbc57cd61mr4298813ybb.50.1712784385702; Wed, 10 Apr 2024 14:26:25 -0700 (PDT) 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 bt14-20020ad455ce000000b006994aae00e9sm42102qvb.7.2024.04.10.14.26.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 14:26:25 -0700 (PDT) Date: Wed, 10 Apr 2024 17:26:23 -0400 From: Marek Polacek To: GCC Patches Subject: [wwwdocs] Document more C++ changes Message-ID: MIME-Version: 1.0 User-Agent: Mutt/2.2.12 (2023-09-09) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_LOTSOFHASH,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: I went through all cp/ commits in GCC 14 and documented a few interesting user-visible changes, modulo Modules. W3 validated. Pushed. commit d65752191baaa137eb6d604b802e7b9170a39752 Author: Marek Polacek Date: Wed Apr 10 17:21:09 2024 -0400 gcc-14/changes: Document more C++ changes diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 4a063346..5c2439ab 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -273,6 +273,9 @@ a work-in-progress.

  • Several C++23 features have been implemented:
      +
    • P0847R7, Deducing this + (PR102609) +
    • P2280R4, Using unknown references in constant expressions (PR106650) @@ -289,12 +292,26 @@ a work-in-progress.

    • Several C++ Defect Reports have been resolved, e.g.:
        +
      • DR 532, + Member/nonmember operator template partial ordering
      • DR 976, Deduction for const T& conversion operators
      • +
      • DR 2262, + Attributes for asm-definition
      • +
      • DR 2359, + Unintended copy initialization with designated initializers
      • +
      • DR 2386, + tuple_size requirements for structured binding
      • DR 2406, [[fallthrough]] attribute and iteration statements
      • DR 2543, constinit and optimized dynamic initialization
      • +
      • DR 2586, + Explicit object parameter for assignment and comparison
      • +
      • DR 2735, + List-initialization and conversions in overload resolution
      • +
      • DR 2799, + Inheriting default constructors
    • @@ -304,6 +321,85 @@ a work-in-progress.

      the template is instantiated ("required from here"), rather than just print filename and line/column numbers.
    • +
    • New built-in __type_pack_element to speed up traits + such as std::tuple_element + (PR100157)
    • +
    • goto can cross the initialization of a trivially initialized + object with a non-trivial destructor + (DR 2256)
    • +
    • -Wdangling-reference false positives have been reduced. The + warning does not warn about std::span-like classes; there is + also a new attribute gnu::no_dangling to suppress the + warning. See + the manual + for more info.
    • +
    • noexcept(expr) is now mangled as per the Itanium ABI
    • +
    • the named return value optimization can now be performed even for + variables declared in an inner block of a function, see the + + test
    • +
    • New -Wnrvo warning, to warn if the named return value + optimization is not performed although it is allowed by + [class.copy.elision]. See + the manual + for more info.
    • +
    • The backing array for std::initializer_list has been made + static, allowing combining multiple equivalent initializer-lists + (git) +
    • +
    • New -Welaborated-enum-base warning, to warn if an additional + enum-base is used in an elaborated-type-specifier
    • +
    • Better #include hints for missing headers + (PR110164)
    • +
    • The arguments of a variable template-id are coerced earlier than + before, so various problems are detected earlier + (PR89442)
    • +
    • -Wmissing-field-initializers is no longer emitted for + empty classes + (PR110064)
    • +
    • The constexpr code now tracks lifetimes in constant evaluation; this + change helps to detect bugs such as accessing a variable whose + lifetime has ended + (PR70331, + PR96630, + PR98675) +
    • +
    • Array destruction can now be devirtualized
    • +
    • In-class member variable template partial specializations are now + accepted (PR71954)
    • +
    • Improved diagnostic for explicit conversion functions: when a conversion + doesn't work out only because the conversion function necessary to do the + conversion couldn't be used because it was marked explicit, explain that + to the user + (git)
    • +
    • Corrected mangling of static/thread_local + structured bindings at function/block scope + (PR111069)
    • +
    • [basic.scope.block]/2 violations are detected even in compound-stmt of + function-try-block and for block-scope external variables + (PR52953)
    • +
    • Improved "not a constant expression" diagnostic when taking the address + of a non-static constexpr variable + (PR91483)
    • +
    • Non-dependent simple assignments are checked even in templates + (PR18474)
    • +
    • Attributes hot and cold can be applied to + classes as well. See + the manual + for more info.
    • +
    • Function template constraints, as well as CTAD placeholders, are + now mangled
    • +
    • Various decltype fixes: + PR79620, + PR79378, + PR83167, + PR96917
    • +
    • New option -fdiagnostics-all-candidates to note all + candidates during overload resolution failure
    • +
    • -Walloc-size and -Wcalloc-transposed-args + warnings are enabled for C++ as well
    • +
    • The DR 2237 code no longer gives an error, it emits + a -Wtemplate-id-cdtor warning instead

    Runtime Library (libstdc++)