This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] template mangling fixes
- To: samuel at codesourcery dot com
- Subject: Re: [C++] template mangling fixes
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Sun, 30 Jul 2000 15:44:55 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <14724.43200.421243.435582@watercress.indetermi.net>
Alex --
This looks mostly OK. A few changes:
- You need ChangeLog bits for the comment changes at the end.
(In contrast to what the GNU coding standards say.)
- CLASSTYPE_TEMPLATE_ID should explain why the original version
doesn't work; essentially, that due to bugs in the parser that are
hard to fix, there's no way to distinguish A<T> from A, where
A<T> is the type as instantiated outside of the template, and A
is the type used without parameters inside the tempalte.
- write_name still looks like it will handle a typedef incorrectly.
When you fall into write_unscoped_name, you'll still have the
typedef TYPE_DECL, and that will result in the wrong thing
happenning, if I follow the logic correctly. I think the
TYPE_DECL case for write_name should say:
decl = TYPE_NAME (TYPE_MAIN_VARIANT (TREE_TYPE (decl)));
so that you get back to the original name.
Do you agree?
If so, make those changes, and check in.
Thanks!
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com