Re: [PATCH] c++: Fix bogus warning in deprecated namespace [PR99318]

2021-03-23 Thread Marek Polacek via Gcc-patches
On Tue, Mar 23, 2021 at 09:05:42AM -0400, Jason Merrill via Gcc-patches wrote: > On 3/9/21 10:22 PM, Marek Polacek wrote: > > In GCC 10, I introduced cp_warn_deprecated_use_scopes so that we can > > handle attribute deprecated on a namespace declaration. This > > function walks the decl's contexts

Re: [PATCH] c++: Fix bogus warning in deprecated namespace [PR99318]

2021-03-23 Thread Jason Merrill via Gcc-patches
On 3/9/21 10:22 PM, Marek Polacek wrote: In GCC 10, I introduced cp_warn_deprecated_use_scopes so that we can handle attribute deprecated on a namespace declaration. This function walks the decl's contexts so that we warn for code like namespace [[deprecated]] N { struct S { }; } N::S s;