[PATCH] [C++] Save space in template_parm_index_s

Andrew Pinski pinskia@physics.uc.edu
Mon Jan 5 05:33:00 GMT 2004


In template_parm_index_s, just like saved_scope, HOST_WIDE_INT is too 
big for the
index and the other fields as no one is going to have 2^15-1 template 
parameters or
levels, yes if this happens we can just change it back but it is not 
going to happen
with the limit of memory as it is now.

Ok? Bootstrapped on powerpc-apple-darwin7.2.0 with no regressions?

Thanks,
Andrew Pinski


ChangeLog:
	* cp-tree.h (template_parm_index_s) <index>: Change to a short.
	<level>: Likewise.
	<orig_level>: Likewise.


Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.945
diff -u -p -r1.945 cp-tree.h
--- cp-tree.h	2 Jan 2004 11:41:49 -0000	1.945
+++ cp-tree.h	5 Jan 2004 04:31:03 -0000
@@ -247,9 +247,9 @@ struct lang_identifier GTY(())
  typedef struct template_parm_index_s GTY(())
  {
    struct tree_common common;
-  HOST_WIDE_INT index;
-  HOST_WIDE_INT level;
-  HOST_WIDE_INT orig_level;
+  short index;
+  short level;
+  short orig_level;
    tree decl;
  } template_parm_index;



More information about the Gcc-patches mailing list