This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Do not call uses_template_parms() unless necessary
- From: Ziemowit Laski <zlaski at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Geoffrey Keating <geoffk at apple dot com>
- Date: Mon, 14 Apr 2003 17:31:49 -0700
- Subject: PATCH: Do not call uses_template_parms() unless necessary
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 at apple dot 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