This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PARM_DECL of DECL_SIZE 0, but TYPE_SIZE of 96 bits
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Gcc Mailing List <gcc at gcc dot gnu dot org>
- Date: Tue, 05 Jul 2005 12:18:03 -0400
- Subject: Re: PARM_DECL of DECL_SIZE 0, but TYPE_SIZE of 96 bits
- References: <1120085832.7612.81.camel@linux-009002219098> <20050629235504.GA23780@redhat.com> <1120094227.8950.12.camel@linux-009002219098> <42CAA8B8.6060109@codesourcery.com>
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 :)