This is the mail archive of the
mailing list for the GCC project.
PATCH C++: revert previous template fix
- From: Ziemowit Laski <zlaski at apple dot com>
- To: Ziemowit Laski <zlaski at apple dot com>
- Cc: Matt Austern <austern at apple dot com>, Mark Mitchell <mark at codesourcery dot com>, Mike Stump <mrs at apple dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 19 Feb 2003 12:51:05 -0800
- Subject: 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
is to prevent the compiler from spinning in an infinite loop when
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
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
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