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++/109761] [10/11/12/13 Regression] Nested class destructor's noexcept specification incorrectly considered as too loose compared to the outer class
Date: Fri, 12 May 2023 15:07:56 +0000	[thread overview]
Message-ID: <bug-109761-4-pqSQGtkQjR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109761-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

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

commit r13-7323-gdc399dfe1265a1222b7cfa0fc35533768a8a1a8a
Author: Patrick Palka <ppalka@redhat.com>
Date:   Tue May 9 15:06:34 2023 -0400

    c++: noexcept-spec from nested class confusion [PR109761]

    When late processing a noexcept-spec from a nested class after completion
    of the outer class (since it's a complete-class context), we pass the wrong
    class context to noexcept_override_late_checks -- the outer class type
    instead of the nested class type -- which leads to bogus errors in the
    below test.

    This patch fixes this by making noexcept_override_late_checks obtain the
    class context directly via DECL_CONTEXT instead of via an additional
    parameter.

            PR c++/109761

    gcc/cp/ChangeLog:

            * parser.cc (cp_parser_class_specifier): Don't pass a class
            context to noexcept_override_late_checks.
            (noexcept_override_late_checks): Remove 'type' parameter
            and use DECL_CONTEXT of 'fndecl' instead.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/noexcept78.C: New test.

    (cherry picked from commit c13906f258fb34b3e0c90ddc8d9191dd72f3da0e)

  parent reply	other threads:[~2023-05-12 15:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06 23:37 [Bug c++/109761] New: " andysem at mail dot ru
2023-05-06 23:41 ` [Bug c++/109761] " pinskia at gcc dot gnu.org
2023-05-06 23:44 ` andysem at mail dot ru
2023-05-06 23:54 ` pinskia at gcc dot gnu.org
2023-05-06 23:58 ` pinskia at gcc dot gnu.org
2023-05-09 13:30 ` ppalka at gcc dot gnu.org
2023-05-09 13:46 ` [Bug c++/109761] [10/11/12/13/14 Regression] " ppalka at gcc dot gnu.org
2023-05-09 19:08 ` cvs-commit at gcc dot gnu.org
2023-05-09 19:10 ` [Bug c++/109761] [10/11/12/13 " ppalka at gcc dot gnu.org
2023-05-12 15:07 ` cvs-commit at gcc dot gnu.org [this message]
2023-07-07 10:45 ` [Bug c++/109761] [11/12/13 " rguenth at gcc dot gnu.org
2023-08-07 23:35 ` [Bug c++/109761] [11/12 " cvs-commit at gcc dot gnu.org
2023-08-09 17:14 ` cvs-commit at gcc dot gnu.org
2023-08-09 17:16 ` 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-109761-4-pqSQGtkQjR@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).