https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123726
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #4) > Note, DECL_CONTEXT can be NULL and the compiler would ICE then. > So I think it needs to be (scope == NULL || !CLASS_TYPE_P (scope)). > Though, shouldn't it diagnose also other decls which aren't in class scope? The code now uses context_for_name_lookup which won't return a NULL_TREE.
