This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: Move FIELD_DECL into it's own structure
> Uh, again, you realize we have a *large* number of non-positive checks
> in there already, right?
I misspoke, we have macros for a large number of non-positive checks, we
only use them in one place :)
> If you inherited from VAR_DECL or PARM_DECL, you'd get bitten
This is still true, however, because we have PARM_DECL_CHECK, etc.
If you inherited from VAR_DECL, for example, you'd fail attempting to
set DECL_THREAD_LOCAL, DECL_HARD_REGISTER, or DECL_IN_TEXT_SECTION,
If you want to do better on checking, the easiest thing to do about
inheritance would be to change the classes to include the subclasses,
but this is tricky.
I'd rather do that as a step 2 or followup after splitting a couple of
these decls, and seeing whether we really want to do this.
> What exactly do you want me to do here? Change all the DECL_CHECK's to
> be specific to the trees that use them.
> If so, i'm only willing to do that on a week by week basis.
By this i mean i'm happy to change the current DECL_CHECK macros to be
all positive checks for *all decls* but FIELD_DECL right now, instead of
tcc_declaration - FIELD_DECL.
As i go through all the _DECL's and discover what's really going on, i'm
happy to remove the approriate code's from those macros.