public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/101239] "Internal compiler error: Error reporting routines re-entered." in size_in_bytes_loc
Date: Mon, 28 Jun 2021 13:23:39 +0000	[thread overview]
Message-ID: <bug-101239-4-YTS6hNbmv6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101239-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101239

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:b7a89c041aa1d67654f1ba7b2839e221c3e14748

commit r12-1844-gb7a89c041aa1d67654f1ba7b2839e221c3e14748
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Jun 28 12:59:19 2021 +0100

    libstdc++: Allow unique_ptr<Incomplete[]>::operator[] [PR 101236]

    PR libstdc++/101236 shows that LLVM depends on being able to use
    unique_ptr<T[]>::operator[] when T is incomplete. This is undefined, but
    previously worked with libstdc++. When I added the conditional noexcept
    to that operator we started to diagnose the incomplete type.

    This change restores support for that case, by making the noexcept
    condition check that the type is complete before checking whether
    indexing on the pointer can throw.  A workaround for PR c++/101239 is
    needed to avoid a bogus error where G++ fails to do SFINAE on the
    ill-formed p[n] expression and gets an ICE. Instead of checking that the
    p[n] expression is valid in the trailing-return-type, we only check that
    the element_type is complete.

    libstdc++-v3/ChangeLog:

            PR libstdc++/101236
            * include/bits/unique_ptr.h (unique_ptr<T[], D>::operator[]):
            Fail gracefully if element_type is incomplete.
            * testsuite/20_util/unique_ptr/cons/incomplete.cc: Clarify that
            the standard doesn't require this test to work for array types.
            * testsuite/20_util/unique_ptr/lwg2762.cc: Check that incomplete
            types can be used with array specialization.
            * testsuite/20_util/unique_ptr/101236.cc: New test.

  parent reply	other threads:[~2021-06-28 13:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 10:17 [Bug c++/101239] New: " redi at gcc dot gnu.org
2021-06-28 10:22 ` [Bug c++/101239] " redi at gcc dot gnu.org
2021-06-28 13:23 ` cvs-commit at gcc dot gnu.org [this message]
2021-10-01 10:32 ` pinskia at gcc dot gnu.org
2021-12-13 19:32 ` arthur.j.odwyer at gmail dot com
2021-12-14  0:02 ` pinskia at gcc dot gnu.org
2021-12-27 15:01 ` cvs-commit at gcc dot gnu.org
2021-12-27 15:02 ` ppalka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-101239-4-YTS6hNbmv6@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).