This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Remove register specifiers.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 19 Dec 2003 18:28:57 -0500 (EST)
- Subject: [patch] Remove register specifiers.
Hi,
Attached is a patch to remove register specifiers.
Tested on i686-pc-linux-gnu. Committed as preapproved (see
http://gcc.gnu.org/ml/gcc/2001-10/msg00614.html).
Kazu Hirata
2003-12-19 Kazu Hirata <kazu@cs.umass.edu>
* dwarfout.c: Remove uses of "register" specifier in
declarations of arguments and local variables.
* gensupport.c: Likewise.
* local-alloc.c: Likewise.
* regclass.c: Likewise.
2003-12-19 Kazu Hirata <kazu@cs.umass.edu>
* cvt.c: Remove uses of "register" specifier in
declarations of arguments and local variables.
* decl.c: Likewise.
* decl2.c: Likewise.
* expr.c: Likewise.
* friend.c: Likewise.
* lex.c: Likewise.
* name-lookup.c: Likewise.
* repo.c: Likewise.
* search.c: Likewise.
* tree.c: Likewise.
* typeck.c: Likewise.
* typeck2.c: Likewise.
Index: dwarfout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarfout.c,v
retrieving revision 1.139
diff -u -r1.139 dwarfout.c
--- dwarfout.c 13 Dec 2003 04:11:19 -0000 1.139
+++ dwarfout.c 19 Dec 2003 23:20:14 -0000
@@ -3720,7 +3720,7 @@
{
case 'd': /* We were called with some kind of a ..._DECL node. */
{
- register tree origin = decl_ultimate_origin (node);
+ tree origin = decl_ultimate_origin (node);
if (origin != NULL)
abstract_origin_attribute (origin);
@@ -4774,8 +4774,8 @@
{
tree bases = BINFO_BASETYPES (binfo);
tree accesses = BINFO_BASEACCESSES (binfo);
- register int n_bases = BINFO_N_BASETYPES (binfo);
- register int i;
+ int n_bases = BINFO_N_BASETYPES (binfo);
+ int i;
for (i = 0; i < n_bases; i++)
{
@@ -5092,7 +5092,7 @@
{
/* And its containing type. */
- register tree origin = decl_class_context (decl);
+ tree origin = decl_class_context (decl);
if (origin)
output_type (origin, containing_scope);
}
@@ -5337,7 +5337,7 @@
{
/* And its containing type. */
- register tree origin = decl_class_context (decl);
+ tree origin = decl_class_context (decl);
if (origin)
output_type (origin, containing_scope);
}
@@ -5363,7 +5363,7 @@
{
void (*func) (void *);
- register tree origin = decl_ultimate_origin (decl);
+ tree origin = decl_ultimate_origin (decl);
if (origin != NULL && TREE_CODE (origin) == PARM_DECL)
func = output_formal_parameter_die;
Index: gensupport.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gensupport.c,v
retrieving revision 1.43
diff -u -r1.43 gensupport.c
--- gensupport.c 21 Nov 2003 06:52:23 -0000 1.43
+++ gensupport.c 19 Dec 2003 23:20:15 -0000
@@ -842,7 +842,7 @@
static char *
save_string (const char *s, int len)
{
- register char *result = xmalloc (len + 1);
+ char *result = xmalloc (len + 1);
memcpy (result, s, len);
result[len] = 0;
Index: local-alloc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/local-alloc.c,v
retrieving revision 1.124
diff -u -r1.124 local-alloc.c
--- local-alloc.c 13 Dec 2003 04:11:23 -0000 1.124
+++ local-alloc.c 19 Dec 2003 23:20:16 -0000
@@ -2293,11 +2293,7 @@
int death)
{
int j = HARD_REGNO_NREGS (regno, mode);
-#ifdef HARD_REG_SET
- /* Declare it register if it's a scalar. */
- register
-#endif
- HARD_REG_SET this_reg;
+ HARD_REG_SET this_reg;
CLEAR_HARD_REG_SET (this_reg);
while (--j >= 0)
Index: regclass.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regclass.c,v
retrieving revision 1.181
diff -u -r1.181 regclass.c
--- regclass.c 11 Dec 2003 00:20:47 -0000 1.181
+++ regclass.c 19 Dec 2003 23:20:17 -0000
@@ -321,10 +321,7 @@
{
for (j = 0; j < N_REG_CLASSES; j++)
{
-#ifdef HARD_REG_SET
- register /* Declare it register if it's a scalar. */
-#endif
- HARD_REG_SET c;
+ HARD_REG_SET c;
int k;
COPY_HARD_REG_SET (c, reg_class_contents[i]);
@@ -355,10 +352,7 @@
{
for (j = 0; j < N_REG_CLASSES; j++)
{
-#ifdef HARD_REG_SET
- register /* Declare it register if it's a scalar. */
-#endif
- HARD_REG_SET c;
+ HARD_REG_SET c;
int k;
COPY_HARD_REG_SET (c, reg_class_contents[i]);
@@ -2544,10 +2538,7 @@
int
reg_classes_intersect_p (enum reg_class c1, enum reg_class c2)
{
-#ifdef HARD_REG_SET
- register
-#endif
- HARD_REG_SET c;
+ HARD_REG_SET c;
if (c1 == c2) return 1;
Index: cp/cvt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cvt.c,v
retrieving revision 1.148
diff -u -r1.148 cvt.c
--- cp/cvt.c 10 Nov 2003 22:02:36 -0000 1.148
+++ cp/cvt.c 19 Dec 2003 23:20:19 -0000
@@ -76,8 +76,8 @@
static tree
cp_convert_to_pointer (tree type, tree expr, bool force)
{
- register tree intype = TREE_TYPE (expr);
- register enum tree_code form;
+ tree intype = TREE_TYPE (expr);
+ enum tree_code form;
tree rval;
if (IS_AGGR_TYPE (intype))
@@ -306,8 +306,8 @@
static tree
convert_to_pointer_force (tree type, tree expr)
{
- register tree intype = TREE_TYPE (expr);
- register enum tree_code form = TREE_CODE (intype);
+ tree intype = TREE_TYPE (expr);
+ enum tree_code form = TREE_CODE (intype);
if (form == POINTER_TYPE)
{
@@ -449,8 +449,8 @@
convert_to_reference (tree reftype, tree expr, int convtype,
int flags, tree decl)
{
- register tree type = TYPE_MAIN_VARIANT (TREE_TYPE (reftype));
- register tree intype;
+ tree type = TYPE_MAIN_VARIANT (TREE_TYPE (reftype));
+ tree intype;
tree rval = NULL_TREE;
tree rval_as_conversion = NULL_TREE;
bool can_convert_intype_to_type;
@@ -612,8 +612,8 @@
tree
ocp_convert (tree type, tree expr, int convtype, int flags)
{
- register tree e = expr;
- register enum tree_code code = TREE_CODE (type);
+ tree e = expr;
+ enum tree_code code = TREE_CODE (type);
if (error_operand_p (e) || type == error_mark_node)
return error_mark_node;
@@ -944,8 +944,8 @@
tree
convert_force (tree type, tree expr, int convtype)
{
- register tree e = expr;
- register enum tree_code code = TREE_CODE (type);
+ tree e = expr;
+ enum tree_code code = TREE_CODE (type);
if (code == REFERENCE_TYPE)
return fold (convert_to_reference (type, e, CONV_C_CAST, LOOKUP_COMPLAIN,
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1163
diff -u -r1.1163 decl.c
--- cp/decl.c 17 Dec 2003 04:45:51 -0000 1.1163
+++ cp/decl.c 19 Dec 2003 23:20:25 -0000
@@ -425,7 +425,7 @@
tree
poplevel (int keep, int reverse, int functionbody)
{
- register tree link;
+ tree link;
/* The chain of decls was accumulated in reverse order.
Put it into forward order, just for cleanliness. */
tree decls;
@@ -1556,8 +1556,8 @@
/* Deal with C++: must preserve virtual function table size. */
if (TREE_CODE (olddecl) == TYPE_DECL)
{
- register tree newtype = TREE_TYPE (newdecl);
- register tree oldtype = TREE_TYPE (olddecl);
+ tree newtype = TREE_TYPE (newdecl);
+ tree oldtype = TREE_TYPE (olddecl);
if (newtype != error_mark_node && oldtype != error_mark_node
&& TYPE_LANG_SPECIFIC (newtype) && TYPE_LANG_SPECIFIC (oldtype))
@@ -1939,7 +1939,7 @@
tree
implicitly_declare (tree functionid)
{
- register tree decl;
+ tree decl;
/* We used to reuse an old implicit decl here,
but this loses with inline functions because it can clobber
@@ -2348,7 +2348,7 @@
{
tree decl = lookup_label (name);
struct named_label_list *ent;
- register struct cp_binding_level *p;
+ struct cp_binding_level *p;
timevar_push (TV_NAME_LOOKUP);
for (ent = named_labels; ent; ent = ent->next)
@@ -2439,7 +2439,7 @@
finish_case_label (tree low_value, tree high_value)
{
tree cond, r;
- register struct cp_binding_level *p;
+ struct cp_binding_level *p;
if (processing_template_decl)
{
@@ -3441,7 +3441,7 @@
int saw_friend = 0;
int saw_typedef = 0;
tree ob_modifier = NULL_TREE;
- register tree link;
+ tree link;
/* If a class, struct, or enum type is declared by the DECLSPECS
(i.e, if a class-specifier, enum-specifier, or non-typename
elaborated-type-specifier appears in the DECLSPECS),
@@ -3638,7 +3638,7 @@
tree prefix_attributes)
{
tree decl;
- register tree type, tem;
+ tree type, tem;
tree context;
/* This should only be done once on the top most decl. */
@@ -5286,7 +5286,7 @@
int
complete_array_type (tree type, tree initial_value, int do_default)
{
- register tree maxindex = NULL_TREE;
+ tree maxindex = NULL_TREE;
int value = 0;
if (initial_value)
@@ -6350,7 +6350,7 @@
and get it as a string, for an error message. */
{
tree *next = &declarator;
- register tree decl;
+ tree decl;
name = NULL;
while (next && *next)
@@ -6674,8 +6674,8 @@
for (spec = declspecs; spec; spec = TREE_CHAIN (spec))
{
- register int i;
- register tree id;
+ int i;
+ tree id;
/* Certain parse errors slip through. For example,
`int class;' is not caught by the parser. Try
@@ -6779,7 +6779,7 @@
error ("two or more data types in declaration of `%s'", name);
else if (TREE_CODE (id) == IDENTIFIER_NODE)
{
- register tree t = lookup_name (id, 1);
+ tree t = lookup_name (id, 1);
if (!t || TREE_CODE (t) != TYPE_DECL)
error ("`%s' fails to be a typedef or built in type",
IDENTIFIER_POINTER (id));
@@ -7098,7 +7098,7 @@
if (decl_context == FIELD)
{
tree tmp = NULL_TREE;
- register int op = 0;
+ int op = 0;
if (declarator)
{
@@ -7474,7 +7474,7 @@
if (TREE_TYPE (declarator))
{
- register tree typemodlist;
+ tree typemodlist;
int erred = 0;
int constp = 0;
int volatilep = 0;
@@ -7993,7 +7993,7 @@
}
{
- register tree decl;
+ tree decl;
if (decl_context == PARM)
{
@@ -9285,7 +9285,7 @@
bool globalize, bool template_header_p)
{
enum tree_code code;
- register tree t;
+ tree t;
struct cp_binding_level *b = current_binding_level;
tree context = NULL_TREE;
@@ -9651,7 +9651,7 @@
tree
start_enum (tree name)
{
- register tree enumtype = NULL_TREE;
+ tree enumtype = NULL_TREE;
struct cp_binding_level *b = current_binding_level;
/* If this is the real definition for a previous forward reference,
@@ -10387,8 +10387,8 @@
static void
store_parm_decls (tree current_function_parms)
{
- register tree fndecl = current_function_decl;
- register tree parm;
+ tree fndecl = current_function_decl;
+ tree parm;
/* This is a chain of any other decls that came in among the parm
declarations. If a parm is declared with enum {foo, bar} x;
@@ -10664,7 +10664,7 @@
tree
finish_function (int flags)
{
- register tree fndecl = current_function_decl;
+ tree fndecl = current_function_decl;
tree fntype, ctype = NULL_TREE;
int inclass_inline = (flags & 2) != 0;
int nested;
@@ -10960,10 +10960,10 @@
tree
finish_method (tree decl)
{
- register tree fndecl = decl;
+ tree fndecl = decl;
tree old_initial;
- register tree link;
+ tree link;
if (decl == void_type_node)
return decl;
Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.689
diff -u -r1.689 decl2.c
--- cp/decl2.c 16 Dec 2003 02:46:23 -0000 1.689
+++ cp/decl2.c 19 Dec 2003 23:20:26 -0000
@@ -1037,8 +1037,7 @@
tree
grokbitfield (tree declarator, tree declspecs, tree width)
{
- register tree value = grokdeclarator (declarator, declspecs, BITFIELD,
- 0, NULL);
+ tree value = grokdeclarator (declarator, declspecs, BITFIELD, 0, NULL);
if (! value) return NULL_TREE; /* friends went bad. */
Index: cp/expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/expr.c,v
retrieving revision 1.73
diff -u -r1.73 expr.c
--- cp/expr.c 22 Jul 2003 23:30:15 -0000 1.73
+++ cp/expr.c 19 Dec 2003 23:20:26 -0000
@@ -78,8 +78,8 @@
cxx_expand_expr (tree exp, rtx target, enum machine_mode tmode, int modifier)
{
tree type = TREE_TYPE (exp);
- register enum machine_mode mode = TYPE_MODE (type);
- register enum tree_code code = TREE_CODE (exp);
+ enum machine_mode mode = TYPE_MODE (type);
+ enum tree_code code = TREE_CODE (exp);
rtx ret;
/* No sense saving up arithmetic to be done
Index: cp/friend.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/friend.c,v
retrieving revision 1.92
diff -u -r1.92 friend.c
--- cp/friend.c 22 Nov 2003 06:49:18 -0000 1.92
+++ cp/friend.c 19 Dec 2003 23:20:26 -0000
@@ -39,7 +39,7 @@
is_friend (tree type, tree supplicant)
{
int declp;
- register tree list;
+ tree list;
tree context;
if (supplicant == NULL_TREE || type == NULL_TREE)
Index: cp/lex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/lex.c,v
retrieving revision 1.319
diff -u -r1.319 lex.c
--- cp/lex.c 16 Dec 2003 16:09:13 -0000 1.319
+++ cp/lex.c 19 Dec 2003 23:20:27 -0000
@@ -838,7 +838,7 @@
tree
cxx_make_type (enum tree_code code)
{
- register tree t = make_node (code);
+ tree t = make_node (code);
/* Create lang_type structure. */
if (IS_AGGR_TYPE_CODE (code)
Index: cp/name-lookup.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/name-lookup.c,v
retrieving revision 1.26
diff -u -r1.26 name-lookup.c
--- cp/name-lookup.c 16 Dec 2003 04:00:00 -0000 1.26
+++ cp/name-lookup.c 19 Dec 2003 23:20:29 -0000
@@ -545,8 +545,8 @@
tree
pushdecl (tree x)
{
- register tree t;
- register tree name;
+ tree t;
+ tree name;
int need_new_binding;
timevar_push (TV_NAME_LOOKUP);
@@ -1811,7 +1811,7 @@
void
clear_anon_tags (void)
{
- register struct cp_binding_level *b;
+ struct cp_binding_level *b;
static int last_cnt = 0;
/* Fast out if no new anon names were declared. */
@@ -1909,7 +1909,7 @@
tree
pushdecl_with_scope (tree x, cxx_scope *level)
{
- register struct cp_binding_level *b;
+ struct cp_binding_level *b;
tree function_decl = current_function_decl;
timevar_push (TV_NAME_LOOKUP);
@@ -2335,7 +2335,7 @@
lookup_tag (enum tree_code form, tree name,
cxx_scope *binding_level, int thislevel_only)
{
- register struct cp_binding_level *level;
+ struct cp_binding_level *level;
/* Nonzero if, we should look past a template parameter level, even
if THISLEVEL_ONLY. */
int allow_template_parms_p = 1;
@@ -2344,7 +2344,7 @@
timevar_push (TV_NAME_LOOKUP);
for (level = binding_level; level; level = level->level_chain)
{
- register tree tail;
+ tree tail;
if (type_is_anonymous && level->type_decls != NULL)
{
tree type = binding_table_find_anon_type (level->type_decls, name);
@@ -2447,7 +2447,7 @@
tree
lookup_tag_reverse (tree type, tree name)
{
- register struct cp_binding_level *level;
+ struct cp_binding_level *level;
timevar_push (TV_NAME_LOOKUP);
for (level = current_binding_level; level; level = level->level_chain)
@@ -2531,7 +2531,7 @@
void
poplevel_class (void)
{
- register struct cp_binding_level *level = class_binding_level;
+ struct cp_binding_level *level = class_binding_level;
tree shadowed;
timevar_push (TV_NAME_LOOKUP);
@@ -3157,8 +3157,8 @@
tree
pushdecl_namespace_level (tree x)
{
- register struct cp_binding_level *b = current_binding_level;
- register tree t;
+ struct cp_binding_level *b = current_binding_level;
+ tree t;
timevar_push (TV_NAME_LOOKUP);
t = pushdecl_with_scope (x, NAMESPACE_LEVEL (current_namespace));
@@ -3977,7 +3977,7 @@
static tree
lookup_type_current_level (tree name)
{
- register tree t = NULL_TREE;
+ tree t = NULL_TREE;
timevar_push (TV_NAME_LOOKUP);
my_friendly_assert (current_binding_level->kind != sk_namespace,
@@ -4491,7 +4491,7 @@
void
pushtag (tree name, tree type, int globalize)
{
- register struct cp_binding_level *b;
+ struct cp_binding_level *b;
timevar_push (TV_NAME_LOOKUP);
b = current_binding_level;
@@ -4514,7 +4514,7 @@
/* Do C++ gratuitous typedefing. */
if (IDENTIFIER_TYPE_VALUE (name) != type)
{
- register tree d = NULL_TREE;
+ tree d = NULL_TREE;
int in_class = 0;
tree context = TYPE_CONTEXT (type);
Index: cp/repo.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/repo.c,v
retrieving revision 1.48
diff -u -r1.48 repo.c
--- cp/repo.c 28 Jun 2003 00:30:30 -0000 1.48
+++ cp/repo.c 19 Dec 2003 23:20:29 -0000
@@ -267,7 +267,7 @@
static void
open_repo_file (const char *filename)
{
- register const char *p;
+ const char *p;
const char *s = get_base_filename (filename);
if (s == NULL)
Index: cp/search.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/search.c,v
retrieving revision 1.283
diff -u -r1.283 search.c
--- cp/search.c 4 Dec 2003 07:03:56 -0000 1.283
+++ cp/search.c 19 Dec 2003 23:20:30 -0000
@@ -125,7 +125,7 @@
static struct search_level *
pop_search_level (struct stack_level *obstack)
{
- register struct search_level *stack = pop_stack_level (obstack);
+ struct search_level *stack = pop_stack_level (obstack);
return stack;
}
@@ -422,7 +422,7 @@
tree
lookup_field_1 (tree type, tree name, bool want_type)
{
- register tree field;
+ tree field;
if (TREE_CODE (type) == TEMPLATE_TYPE_PARM
|| TREE_CODE (type) == BOUND_TEMPLATE_TEMPLATE_PARM
Index: cp/tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/tree.c,v
retrieving revision 1.357
diff -u -r1.357 tree.c
--- cp/tree.c 13 Dec 2003 04:28:50 -0000 1.357
+++ cp/tree.c 19 Dec 2003 23:20:31 -0000
@@ -1295,9 +1295,9 @@
tree
build_min_nt (enum tree_code code, ...)
{
- register tree t;
- register int length;
- register int i;
+ tree t;
+ int length;
+ int i;
va_list p;
va_start (p, code);
@@ -1321,9 +1321,9 @@
tree
build_min (enum tree_code code, tree tt, ...)
{
- register tree t;
- register int length;
- register int i;
+ tree t;
+ int length;
+ int i;
va_list p;
va_start (p, tt);
@@ -1352,9 +1352,9 @@
tree
build_min_non_dep (enum tree_code code, tree non_dep, ...)
{
- register tree t;
- register int length;
- register int i;
+ tree t;
+ int length;
+ int i;
va_list p;
va_start (p, non_dep);
@@ -1454,7 +1454,7 @@
bool
cp_tree_equal (tree t1, tree t2)
{
- register enum tree_code code1, code2;
+ enum tree_code code1, code2;
if (t1 == t2)
return true;
Index: cp/typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/typeck.c,v
retrieving revision 1.513
diff -u -r1.513 typeck.c
--- cp/typeck.c 16 Dec 2003 01:15:11 -0000 1.513
+++ cp/typeck.c 19 Dec 2003 23:20:34 -0000
@@ -579,8 +579,8 @@
tree
merge_types (tree t1, tree t2)
{
- register enum tree_code code1;
- register enum tree_code code2;
+ enum tree_code code1;
+ enum tree_code code2;
tree attributes;
/* Save time if the two types are the same. */
@@ -1265,8 +1265,8 @@
tree
decay_conversion (tree exp)
{
- register tree type;
- register enum tree_code code;
+ tree type;
+ enum tree_code code;
type = TREE_TYPE (exp);
code = TREE_CODE (type);
@@ -1317,7 +1317,7 @@
return build_unary_op (ADDR_EXPR, exp, 0);
if (code == ARRAY_TYPE)
{
- register tree adr;
+ tree adr;
tree ptrtype;
if (TREE_CODE (exp) == INDIRECT_REF)
@@ -2010,7 +2010,7 @@
tree
build_indirect_ref (tree ptr, const char *errorstring)
{
- register tree pointer, type;
+ tree pointer, type;
if (ptr == error_mark_node)
return error_mark_node;
@@ -2348,8 +2348,8 @@
tree
build_function_call (tree function, tree params)
{
- register tree fntype, fndecl;
- register tree coerced_params;
+ tree fntype, fndecl;
+ tree coerced_params;
tree result;
tree name = NULL_TREE, assembler_name = NULL_TREE;
int is_method;
@@ -2466,8 +2466,8 @@
tree
convert_arguments (tree typelist, tree values, tree fndecl, int flags)
{
- register tree typetail, valtail;
- register tree result = NULL_TREE;
+ tree typetail, valtail;
+ tree result = NULL_TREE;
const char *called_thing = 0;
int i = 0;
@@ -2492,8 +2492,8 @@
valtail;
valtail = TREE_CHAIN (valtail), i++)
{
- register tree type = typetail ? TREE_VALUE (typetail) : 0;
- register tree val = TREE_VALUE (valtail);
+ tree type = typetail ? TREE_VALUE (typetail) : 0;
+ tree val = TREE_VALUE (valtail);
if (val == error_mark_node)
return error_mark_node;
@@ -2677,17 +2677,17 @@
int convert_p ATTRIBUTE_UNUSED)
{
tree op0, op1;
- register enum tree_code code0, code1;
+ enum tree_code code0, code1;
tree type0, type1;
/* Expression code to give to the expression when it is built.
Normally this is CODE, which is what the caller asked for,
but in some special cases we change it. */
- register enum tree_code resultcode = code;
+ enum tree_code resultcode = code;
/* Data type in which the computation is to be performed.
In the simplest cases this is the common type of the arguments. */
- register tree result_type = NULL;
+ tree result_type = NULL;
/* Nonzero means operands have already been type-converted
in whatever way is necessary.
@@ -3396,8 +3396,8 @@
build_type = result_type;
{
- register tree result = build (resultcode, build_type, op0, op1);
- register tree folded;
+ tree result = build (resultcode, build_type, op0, op1);
+ tree folded;
folded = fold (result);
if (folded == result)
@@ -3412,8 +3412,7 @@
of pointer PTROP and integer INTOP. */
static tree
-cp_pointer_int_sum (enum tree_code resultcode, register tree ptrop,
- register tree intop)
+cp_pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop)
{
tree res_type = TREE_TYPE (ptrop);
@@ -3431,9 +3430,9 @@
The resulting tree has type int. */
static tree
-pointer_diff (register tree op0, register tree op1, register tree ptrtype)
+pointer_diff (tree op0, tree op1, tree ptrtype)
{
- register tree result, folded;
+ tree result, folded;
tree restype = ptrdiff_type_node;
tree target_type = TREE_TYPE (ptrtype);
@@ -3630,8 +3629,8 @@
build_unary_op (enum tree_code code, tree xarg, int noconvert)
{
/* No default_conversion here. It causes trouble for ADDR_EXPR. */
- register tree arg = xarg;
- register tree argtype = 0;
+ tree arg = xarg;
+ tree argtype = 0;
const char *errstring = NULL;
tree val;
@@ -3769,7 +3768,7 @@
0);
{
- register tree inc;
+ tree inc;
tree result_type = TREE_TYPE (arg);
arg = get_unwidened (arg, 0);
@@ -4214,7 +4213,7 @@
bool
cxx_mark_addressable (tree exp)
{
- register tree x = exp;
+ tree x = exp;
while (1)
switch (TREE_CODE (x))
@@ -4750,7 +4749,7 @@
tree
build_c_cast (tree type, tree expr)
{
- register tree value = expr;
+ tree value = expr;
tree otype;
if (type == error_mark_node || expr == error_mark_node)
@@ -4915,7 +4914,7 @@
tree
build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs)
{
- register tree result;
+ tree result;
tree newrhs = rhs;
tree lhstype = TREE_TYPE (lhs);
tree olhstype = lhstype;
@@ -5583,8 +5582,8 @@
convert_for_assignment (tree type, tree rhs,
const char *errtype, tree fndecl, int parmnum)
{
- register tree rhstype;
- register enum tree_code coder;
+ tree rhstype;
+ enum tree_code coder;
/* Strip NON_LVALUE_EXPRs since we aren't using as an lvalue. */
if (TREE_CODE (rhs) == NON_LVALUE_EXPR)
@@ -5682,9 +5681,9 @@
convert_for_initialization (tree exp, tree type, tree rhs, int flags,
const char *errtype, tree fndecl, int parmnum)
{
- register enum tree_code codel = TREE_CODE (type);
- register tree rhstype;
- register enum tree_code coder;
+ enum tree_code codel = TREE_CODE (type);
+ tree rhstype;
+ enum tree_code coder;
/* build_c_cast puts on a NOP_EXPR to make the result not an lvalue.
Strip such NOP_EXPRs, since RHS is used in non-lvalue context. */
@@ -5767,10 +5766,10 @@
int vol, location_t locus)
{
int noutputs = list_length (outputs);
- register int i;
+ int i;
/* o[I] is the place that output number I should be written. */
- register tree *o = alloca (noutputs * sizeof (tree));
- register tree tail;
+ tree *o = alloca (noutputs * sizeof (tree));
+ tree tail;
/* Record the contents of OUTPUTS before it is modified. */
for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
Index: cp/typeck2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/typeck2.c,v
retrieving revision 1.150
diff -u -r1.150 typeck2.c
--- cp/typeck2.c 22 Oct 2003 23:42:47 -0000 1.150
+++ cp/typeck2.c 19 Dec 2003 23:20:35 -0000
@@ -306,7 +306,7 @@
tree
store_init_value (tree decl, tree init)
{
- register tree value, type;
+ tree value, type;
/* If variable's type was invalidly declared, just ignore it. */
@@ -470,8 +470,7 @@
if (TYPE_DOMAIN (type) != 0
&& TREE_CONSTANT (TYPE_SIZE (type)))
{
- register int size
- = TREE_INT_CST_LOW (TYPE_SIZE (type));
+ int size = TREE_INT_CST_LOW (TYPE_SIZE (type));
size = (size + BITS_PER_UNIT - 1) / BITS_PER_UNIT;
/* In C it is ok to subtract 1 from the length of the string
because it's ok to ignore the terminating null char that is
@@ -577,11 +576,11 @@
static tree
process_init_constructor (tree type, tree init, tree* elts)
{
- register tree tail;
+ tree tail;
/* List of the elements of the result constructor,
in reverse order. */
- register tree members = NULL;
- register tree next1;
+ tree members = NULL;
+ tree next1;
tree result;
int allconstant = 1;
int allsimple = 1;
@@ -605,8 +604,8 @@
if (TREE_CODE (type) == ARRAY_TYPE || TREE_CODE (type) == VECTOR_TYPE)
{
- register long len;
- register int i;
+ long len;
+ int i;
if (TREE_CODE (type) == ARRAY_TYPE)
{
@@ -696,7 +695,7 @@
}
else if (TREE_CODE (type) == RECORD_TYPE)
{
- register tree field;
+ tree field;
if (tail)
{
@@ -817,7 +816,7 @@
/* If the initializer was empty, use default zero initialization. */
&& tail)
{
- register tree field = TYPE_FIELDS (type);
+ tree field = TYPE_FIELDS (type);
/* Find the first named field. ANSI decided in September 1990
that only named fields count here. */