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]
Other format: [Raw text]

PATCH C++: revert previous template fix

On Wednesday, Feb 19, 2003, at 12:29 US/Pacific, Ziemowit Laski wrote:
In this particular case, the consequences should be nil. As I understand Mark's November 8 patch, it merely tries to... improve performance by storing the visited tree nodes in a hash table. :-) :-) :-) So one option is definitely to just back it out (along with the 'htab_delete' fix that was added later). The other is to use the hash table functionality already supported by walk_tree(). I was not aware of this functionality (and, it would appear, neither was Mark) until Devang pointed it out to me yesterday. I'm currently running a test utilizing this. If it offers further performance, I'll offer it as part of the "revert patch" patch.

Ok, I tried utilizing the walk_tree() hash table functionality, and it slows things down even more than Mark's original patch. :-) :-) So much for that.

I'll post the revert patch & ChangeLog shortly. Stay tuned.

Actually, it turns out I misunderstood the intent of Mark's patch. The intent
is to prevent the compiler from spinning in an infinite loop when presented with
illegal template code (see PR c++/8338). There is also a test case,
g++.dg/template/crash2.C, which will presumably fail after the patch is reverted.

So, should we nevertheless revert the patch? I'd say that we should, on the premise
that it only addresses illegal code. I guess this also means we should mark the
test case as an "expected failure" (someone would need to show me how to do this,
as I have no idea).

What do you all think?


Ziemowit Laski                 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group        Cupertino, CA USA  95014-2083
Apple Computer, Inc.           +1.408.974.6229  Fax .5477

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