On Tue, 2005-07-05 at 08:35 -0700, Mark Mitchell wrote: > Daniel Berlin wrote: > > > 3. Not call layout_decl on the template types until they are completed. > > In the abstract, this is the best choice. Although we need to know that > types are complete (which means (in the current implementation) that > TYPE_SIZE != NULL_TREE), but the C++ front end should not be caring > about DECL_SIZE on a PARM_DECL from a template. If it is, I'd like to > know where.
the layout_decl that sets it to size 0 gets called originally from #0 layout_decl (decl=0x40088b64, known_align=0) at stor-layout.c:294 #1 0x085f4d51 in build_decl_stat (code=PARM_DECL, name=0x400cc208, type=0x40088870) at tree.c:2874 #2 0x080f88c3 in cp_build_parm_decl (name=0x400cc208, type=0x40088870) at decl2.c:141 #3 0x0807bc94 in grokdeclarator (declarator=0x898b244, declspecs=0x898b268, decl_context=PARM, initialized=0, attrlist=0xbfffe918) at decl.c:7768 IE it's getting called from common code. Because i wasn't sure how to get around this easily, i simply went for the easy solution :)