This is the mail archive of the gcc-patches@gcc.gnu.org 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]
Other format: [Raw text]

Re: IMA: backward-compatible behavior fromlhd_set_decl_assembler_name


Geoff Keating <geoffk@geoffk.org> writes:

> On 07/07/2004, at 6:16 PM, Zack Weinberg wrote:
>> No, I'm claiming that (2) does *not* affect every place in the
>> compiler that looks at DECL_CONTEXT, and I don't see how you could
>> possibly think that unless you didn't actually read my patch.
...

> Now, I may be misreading it, but doesn't this cause DECL_CONTEXT to be
> set, sometimes, to a T_U_D; but after your patch, only when IMA is in
> use?

Correct.

> And thus, any code that's looking at DECL_CONTEXT might work happily
> with it being NULL when not using IMA, and then break when it sees a
> T_U_D [when] using IMA?

Possible.  That is a different observation from the one I thought you
were originally making.  I would characterise it as "the IMA feature
introduces a code path which is rarely taken, and so may bitrot, so
let's artificially cause it to be used more often to reduce the risk
of bitrot."

Personally I would rather keep IMA working with a testsuite (which
Andrew Pinski has been kind enough to write, and I'll certainly add
your earlier test case).  If you're dead set on having DECL_CONTEXT of
file-scope DECLs be a TRANSLATION_UNIT_DECL whether or not IMA is in
use, I suppose I could put the special case for num_in_fnames==1 into
lhd_set_decl_assembler_name.

zw


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