Richard Henderson <[EMAIL PROTECTED]> writes:

> On Wed, Jun 29, 2005 at 09:17:07PM -0400, Daniel Berlin wrote:
> > 1. In require_complete_types_for_parms, in the C++ FE, reset DECL_SIZE
> > to NULL before we call layout_decl on the parm and let layout_decl
> > figure out what to do.
> 
> This is what relayout_decl does.
> 
> > 2. Add code in layout_decl to copy TYPE_SIZE/TYPE_SIZE_UNIT if the
> > DECL_SIZE is integer_cst (0)
> 
> Bad.
> 
> > 3. Not call layout_decl on the template types until they are completed.
> 
> Certainly an option; not doing extra work is good.
> 
> 4. Make sure that template types are incomplete.  That is, with
>    TYPE_SIZE/TYPE_SIZE_UNIT unset.

I think this makes a lot of sense considering the language semantics.
(An alternative would be to make TYPE_SIZE an expression based on the
template parameter, but that seems like a lot of work for very little
gain.)

Reply via email to