diff options
author | Patrick Palka <ppalka@redhat.com> | 2023-05-09 15:06:34 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2023-05-09 15:06:34 -0400 |
commit | c13906f258fb34b3e0c90ddc8d9191dd72f3da0e (patch) | |
tree | 0e7bdbd2cb12929818abe1931dd958d03f23845a /gcc/cp/constraint.cc | |
parent | cf2c47b159dabe066650862de2ef493f2a3bf1f4 (diff) | |
download | gcc-c13906f258fb34b3e0c90ddc8d9191dd72f3da0e.zip gcc-c13906f258fb34b3e0c90ddc8d9191dd72f3da0e.tar.gz gcc-c13906f258fb34b3e0c90ddc8d9191dd72f3da0e.tar.bz2 |
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.
Diffstat (limited to 'gcc/cp/constraint.cc')
0 files changed, 0 insertions, 0 deletions