Hi all, Jason,
while looking a bit into c++/57942, I noticed (again) that in the
definition of the predicate DERIVED_FROM_P we use tf_warning_or_error,
not tf_none, which seems weird for a predicate, being in general able to
produce hard errors (*). I tested the below with no regressions.
Thanks,
Paolo.
(*) Note that, depending on how it's called, the predicate can currently
produce errors anyway, for example because it calls complete_type. This
may or may not be all there is to c++/57942.
////////////////////
Index: cp-tree.h
===================================================================
--- cp-tree.h (revision 201122)
+++ cp-tree.h (working copy)
@@ -1320,8 +1320,7 @@ enum languages { lang_c, lang_cplusplus, lang_java
/* Nonzero iff TYPE is derived from PARENT. Ignores accessibility and
ambiguity issues. */
#define DERIVED_FROM_P(PARENT, TYPE) \
- (lookup_base ((TYPE), (PARENT), ba_any, NULL, tf_warning_or_error)\
- != NULL_TREE)
+ (lookup_base ((TYPE), (PARENT), ba_any, NULL, tf_none) != NULL_TREE)
/* Gives the visibility specification for a class type. */
#define CLASSTYPE_VISIBILITY(TYPE) \