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++/96673] [8/9/10/11 Regression] Friend class with templates and default constructor not recognized in C++14 or later
Date: Tue, 06 Apr 2021 20:42:14 +0000	[thread overview]
Message-ID: <bug-96673-4-MSW0KXTRRH@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96673-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

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

commit r11-8018-gde03b82f3ca9103eba3699d1dc91b1d0ee1f16cb
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Apr 6 15:13:02 2021 -0400

    c++: access checking in aggregate initialization [PR96673]

    We were deferring access checks while parsing B<int>{}, didn't adjust that
    when we went to instantiate the default member initializer for B::c,
    deferred access checking for C::C, and then checked it after parsing
    B<int>{}, back in the main() context which has no access.  We need to do
the
    access checks in the class context of the DMI.

    I tried fixing this in push_to/pop_from_top_level, but that caused several
    regressions.

    gcc/cp/ChangeLog:

            PR c++/96673
            * init.c (get_nsdmi): Don't defer access checking.

    gcc/testsuite/ChangeLog:

            PR c++/96673
            * g++.dg/cpp1y/nsdmi-aggr13.C: New test.

  parent reply	other threads:[~2021-04-06 20:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18 10:16 [Bug c++/96673] New: " andebjor at gmail dot com
2020-08-18 16:08 ` [Bug c++/96673] [8/9/10/11 Regression] " mpolacek at gcc dot gnu.org
2020-08-18 16:18 ` mpolacek at gcc dot gnu.org
2020-10-12 12:32 ` rguenth at gcc dot gnu.org
2021-04-06 19:00 ` jason at gcc dot gnu.org
2021-04-06 20:42 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-06 20:42 ` [Bug c++/96673] [8/9/10 " jason at gcc dot gnu.org
2021-05-14  9:53 ` [Bug c++/96673] [9/10 " jakub at gcc dot gnu.org
2021-05-20 21:35 ` cvs-commit at gcc dot gnu.org
2021-06-01  8:18 ` rguenth at gcc dot gnu.org
2022-05-13 17:41 ` [Bug c++/96673] [9 " cvs-commit at gcc dot gnu.org
2022-05-13 17:44 ` jason 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-96673-4-MSW0KXTRRH@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).