diff options
author | Jason Merrill <jason@redhat.com> | 2023-03-16 15:35:15 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2023-03-16 18:11:23 -0400 |
commit | 78b3bf0e65072f5fa42a8da43698711220d4f8ef (patch) | |
tree | ecea317882f2a2aabf98beb27838d6e6e6cbc6d2 /gcc/cp/cp-tree.h | |
parent | b323f52ccf966800297b0520b9e1d4b3951db525 (diff) | |
download | gcc-78b3bf0e65072f5fa42a8da43698711220d4f8ef.zip gcc-78b3bf0e65072f5fa42a8da43698711220d4f8ef.tar.gz gcc-78b3bf0e65072f5fa42a8da43698711220d4f8ef.tar.bz2 |
c++: __func__ and local class DMI [PR105809]
As in 108242, we need to instantiate in the context of the enclosing
function, not after it's gone.
PR c++/105809
gcc/cp/ChangeLog:
* init.cc (get_nsdmi): Split out...
(maybe_instantiate_nsdmi_init): ...this function.
* cp-tree.h: Declare it.
* pt.cc (tsubst_expr): Use it.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/constexpr-__func__3.C: New test.
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index dfc1c84..b74c18b 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -7086,6 +7086,7 @@ extern bool is_copy_initialization (tree); extern tree build_zero_init (tree, tree, bool); extern tree build_value_init (tree, tsubst_flags_t); extern tree build_value_init_noctor (tree, tsubst_flags_t); +extern tree maybe_instantiate_nsdmi_init (tree, tsubst_flags_t); extern tree get_nsdmi (tree, bool, tsubst_flags_t); extern tree build_offset_ref (tree, tree, bool, tsubst_flags_t); |