This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Some questions about FIELD_DECL
- 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>, jsm28 at gcc dot gnu dot org
- Date: Mon, 23 May 2005 15:59:51 -0400
- Subject: Re: Some questions about FIELD_DECL
- References: <1116715395.13015.65.camel@linux.site> <42922E7F.9010301@codesourcery.com>
On Mon, 2005-05-23 at 12:26 -0700, Mark Mitchell wrote:
> Daniel Berlin wrote:
> > While moving FIELD_DECL to it's own substruct, the following questions
> > have come up. I figured one of you might know:
> >
> > 1. Do we need DECL_ASSEMBLER_NAME on FIELD_DECL? I can't think of a
> > place where we would actually try to *output* a FIELD_DECL directly, but
> > maybe i've missed something. I ask because the C frontend tests
> > decl_assembler_name on field decl, but never sets it on them.
> >
> > Related to this:
> >
> > 2. Do we allow setting the section of a FIELD_DECL, so that
> > DECL_SECTION_NAME on FIELD_DECL is necessary?
>
> We should need neither DECL_ASSEMBLER_NAME nor DECL_SECTION_NAME. If we
> do, that's a bug in whatever is using them -- but I don't know how hard
> it would be to fix.
Only one place was attempting to set them (the C++ FE, and the patch
removed it), and one place was attempting to verify them (this was the
gcc_assert you didn't like :P)
> In GCC, things that look like fields, but are
> really variables, like C++ static data members or anonymous union
> members, should be represented as VAR_DECLs.
>