This is the mail archive of the
mailing list for the GCC project.
Re: [C++ PATCH] Fix up DECL_ARG_TYPE (PR c++/36631)
Jason Merrill wrote:
> Mark Mitchell wrote:
>> That may be -- but I think the basic point remains true. DECL_ARG_TYPE
>> is not a front-end concept. It's an implementation detail, describing
>> how exactly the argument is passed. As such, it really should be left
>> to the middle-end to compute as needed.
> Well, it depends on the ABI, which can be language-specific.
Indeed, but this seems to me like an appropriate place for a langhook,
if one is required. It's language-specific information that's required
as part of the lowering process from language-specific trees to GENERIC
I guess my basic point is that by deferring this until that point, we're
guaranteed to avoid problems with incomplete types. If we try to do it
before the translation unit is completely processed, then we're at risk
of getting it wrong. So, a lazy approach (whether by making
DECL_ARG_TYPE itself actually invoke a hook if the value is NULL, or by
doing it at the point of gimplification, or some other strategy) seems
(650) 331-3385 x713