This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fix to EH bug caused by packed union issue

    Since `layout_decl' aborts for most kinds of decls -- but specifically
    does not abort for FIELD_DECL, one must assume it accepts FIELD_DECLs.
    So, if you're now asserting that it should not be called for *any*
    FIELD_DECLs, you need to change it to abort in that case too.  If for
    *these* FIELD_DECLs you need an explanatory comment about why for
    other DECLs, but not FIELD_DECLs.

The issue is simply that layout_decl is called for FIELD_DECLs only as
part of laying out the type they are in, not before.  So I don't
understand your comment.

    I don't think I can quite parse that sentence, but it's disturbing
    from context.  The "I think" is troubling because if you're not sure,
    I'm not sure at all.  And I'm worried that if someone were to fix it
    to do what you wanted it to, they might then break things.

I'm *sure* it doesn't do what I wanted it to do.  The only time it does
anything is if layout_decl is called with a FIELD_DECL before the record
is actually laid out and that's wrong anyway.

    Please revert the original change and this one and start over,
    beginning at the beginning, with what you are trying to achieve and
    how you want to achieve it, and let everyone comment on it, and then
    we'll decide what to do.

All but one hunk of that patch is totally unrelated to this issue since it
only adds a hook for a front-end and doesn't change anything for front ends
that can't use it.  I'll remove the one hunk in question.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]