c++: attribute on dtor in template [PR108795]
authorJason Merrill <jason@redhat.com>
Tue, 21 Mar 2023 19:15:27 +0000 (15:15 -0400)
committerJason Merrill <jason@redhat.com>
Wed, 22 Mar 2023 16:04:29 +0000 (12:04 -0400)
commit426cab4e3b46abaeae0813042b5addc789e3b2be
treee991d6954901d5518fa51c98b738ef7fd40e94a4
parentd3a6f174543816600b1f472997d492088e4e396a
c++: attribute on dtor in template [PR108795]

Since r7-2549 we were throwing away the explicit C:: when we found that ~C
has an attribute that we treat as making its type dependent.

PR c++/108795

gcc/cp/ChangeLog:

* semantics.cc (finish_id_expression_1): Check scope before
returning id_expression.

gcc/testsuite/ChangeLog:

* g++.dg/ext/attr-tsafe1.C: New test.
gcc/cp/semantics.cc
gcc/testsuite/g++.dg/ext/attr-tsafe1.C [new file with mode: 0644]