PATCH: Do not call uses_template_parms() unless necessary

Ziemowit Laski zlaski@apple.com
Tue Apr 15 00:31:00 GMT 2003


This super-trivial patch has been pre-approved by Geoff; I will
place it in 3.3 and mainline.

--Zem

2003-04-14  Ziemowit Laski  <zlaski@apple.com>

         * tree.c (build_cplus_array_type_1): Do not call
         uses_template_parms() on a NULL index_type.

Index: gcc/cp/tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/tree.c,v
retrieving revision 1.322
diff -c -3 -p -r1.322 tree.c
*** gcc/cp/tree.c       10 Apr 2003 08:07:13 -0000      1.322
--- gcc/cp/tree.c       15 Apr 2003 00:30:25 -0000
*************** build_cplus_array_type_1 (elt_type, inde
*** 516,522 ****
          && index_type && TYPE_MAX_VALUE (index_type)
          && TREE_CODE (TYPE_MAX_VALUE (index_type)) != INTEGER_CST)
         || uses_template_parms (elt_type)
!       || uses_template_parms (index_type))
       {
         t = make_node (ARRAY_TYPE);
         TREE_TYPE (t) = elt_type;
--- 516,522 ----
          && index_type && TYPE_MAX_VALUE (index_type)
          && TREE_CODE (TYPE_MAX_VALUE (index_type)) != INTEGER_CST)
         || uses_template_parms (elt_type)
!       || (index_type && uses_template_parms (index_type)))
       {
         t = make_node (ARRAY_TYPE);
         TREE_TYPE (t) = elt_type;

--------------------------------------------------------------
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



More information about the Gcc-patches mailing list