This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Renaming IS_AGGR_TYPE & co

Paolo Carlini wrote:
Hi Mark,
In all three uses of that function, we want a class type, AFAICT.  So,
I would change the function to be is_class_type and use CLASS_TYPE_P
as the predicate in the test.
I tried that, and unfortunately the build fails in libstdc++-v3 with the
below. I'm pretty sure (if you want I can double check) that
build_offset_ref (in init.c) is the caller passing sometimes a
non-CLASS_TYPE_P, it asserts only TYPE_P. I was about to submit a
version just using maybe_class_type_p, but was unsure about the error

What is the "type" in build_offset_ref at this point? I'm guessing it's a TYPENAME_TYPE. That's a little surprising, since we check for dependent types right above the call to is_aggr_type. What's the call stack?

If it is a TYPENAME_TYPE, the fix might be to do:

      || class_type_p (...))

We still shouldn't need to allow things like TEMPLATE_TYPE_PARM; those are *always* dependent.


Mark Mitchell
(650) 331-3385 x713

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]