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]

Re: [C++] template mangling fixes



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

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