This is the mail archive of the
mailing list for the GCC project.
Re: Renaming IS_AGGR_TYPE & co
Paolo Carlini wrote:
Some additional details...
You are right, in the sense that actually the TYPENAME_TYPE comes from aDoing, in finish_base_specifier, something like:
different caller, finish_base_specifier (in semantics.c). The below is
is the complete call stack. Then, would it make sense to change somehow
finish_base_specifier to allow for TYPENAME_TYPEs?
- else if (! is_aggr_type (base, 1))
+ else if (TREE_CODE (base) != TYPENAME_TYPE
+ && TREE_CODE (base) != TEMPLATE_TYPE_PARM
+ && TREE_CODE (base) != BOUND_TEMPLATE_TEMPLATE_PARM
+ && ! is_class_type (base, 1))
result = NULL_TREE;
allows the testsuite to pass...
I think that in this case you want MAYBE_CLASS_TYPE_P.
Here, the compiler is checking to see if the type is a valid base class
type. If it's a template type parameter, it *might* be a class type --
we just don't know yet. So, we want to accept it.
(650) 331-3385 x713