In this test: struct S { enum [[deprecated]] E { D }; }; int main() { auto a1 = S::D; auto a2 = S::E::D; } we emit a -Wdeprecated-declarations warning only for a2 but not a1, whereas clang++ warns for a1 too (twice, in fact). I suppose we want a warning there as well. C++20 using enum test: enum class [[deprecated]] E { X }; int main() { using enum E; auto a = X; } clang++ warns but g++ doesn't.