Re: [PATCH 1/2] c++: Fix push_access_scope and introduce RAII wrapper for it

2021-06-30 Thread Jason Merrill via Gcc-patches
On 6/30/21 11:03 AM, Patrick Palka wrote: On Tue, 29 Jun 2021, Jason Merrill wrote: On 6/29/21 1:57 PM, Patrick Palka wrote: When push_access_scope is passed a TYPE_DECL for a class type (which can happen during e.g. satisfaction), we undesirably push only the enclosing context of the class

Re: [PATCH 1/2] c++: Fix push_access_scope and introduce RAII wrapper for it

2021-06-30 Thread Patrick Palka via Gcc-patches
On Tue, 29 Jun 2021, Jason Merrill wrote: > On 6/29/21 1:57 PM, Patrick Palka wrote: > > When push_access_scope is passed a TYPE_DECL for a class type (which > > can happen during e.g. satisfaction), we undesirably push only the > > enclosing context of the class instead of the class itself.

Re: [PATCH 1/2] c++: Fix push_access_scope and introduce RAII wrapper for it

2021-06-29 Thread Jason Merrill via Gcc-patches
On 6/29/21 1:57 PM, Patrick Palka wrote: When push_access_scope is passed a TYPE_DECL for a class type (which can happen during e.g. satisfaction), we undesirably push only the enclosing context of the class instead of the class itself. This causes us to mishandle e.g. testcase below due to us

[PATCH 1/2] c++: Fix push_access_scope and introduce RAII wrapper for it

2021-06-29 Thread Patrick Palka via Gcc-patches
When push_access_scope is passed a TYPE_DECL for a class type (which can happen during e.g. satisfaction), we undesirably push only the enclosing context of the class instead of the class itself. This causes us to mishandle e.g. testcase below due to us not entering the scope of A before checking