* [ob] Last remaining "register" attributes
@ 2003-09-20 17:51 Andrew Cagney
2003-09-25 16:27 ` David Carlton
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2003-09-20 17:51 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 33 bytes --]
Hopefully :-)
committed,
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 7356 bytes --]
2003-09-20 Andrew Cagney <cagney@redhat.com>
* cli/cli-script.c: Remove "register" attributes.
* config/pa/tm-hppa.h: Ditto.
* cli/cli-decode.c: Ditto.
* cli/cli-cmds.c: Ditto.
Index: cli/cli-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v
retrieving revision 1.33
diff -u -r1.33 cli-cmds.c
--- cli/cli-cmds.c 22 Jun 2003 04:23:52 -0000 1.33
+++ cli/cli-cmds.c 20 Sep 2003 17:48:42 -0000
@@ -444,7 +444,7 @@
echo_command (char *text, int from_tty)
{
char *p = text;
- register int c;
+ int c;
if (text)
while ((c = *p++) != '\0')
Index: cli/cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.32
diff -u -r1.32 cli-decode.c
--- cli/cli-decode.c 9 Aug 2003 15:10:09 -0000 1.32
+++ cli/cli-decode.c 20 Sep 2003 17:48:42 -0000
@@ -133,7 +133,7 @@
add_cmd (char *name, enum command_class class, void (*fun) (char *, int),
char *doc, struct cmd_list_element **list)
{
- register struct cmd_list_element *c
+ struct cmd_list_element *c
= (struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
struct cmd_list_element *p;
@@ -212,8 +212,8 @@
{
/* Must do this since lookup_cmd tries to side-effect its first arg */
char *copied_name;
- register struct cmd_list_element *old;
- register struct cmd_list_element *c;
+ struct cmd_list_element *old;
+ struct cmd_list_element *c;
copied_name = (char *) alloca (strlen (oldname) + 1);
strcpy (copied_name, oldname);
old = lookup_cmd (&copied_name, *list, "", 1, 1);
@@ -247,7 +247,7 @@
char *prefixname, int allow_unknown,
struct cmd_list_element **list)
{
- register struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
+ struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
c->prefixlist = prefixlist;
c->prefixname = prefixname;
c->allow_unknown = allow_unknown;
@@ -262,7 +262,7 @@
struct cmd_list_element **prefixlist, char *prefixname,
int allow_unknown, struct cmd_list_element **list)
{
- register struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
+ struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
c->prefixlist = prefixlist;
c->prefixname = prefixname;
c->allow_unknown = allow_unknown;
@@ -500,7 +500,7 @@
void
delete_cmd (char *name, struct cmd_list_element **list)
{
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
struct cmd_list_element *p;
while (*list && STREQ ((*list)->name, name))
@@ -577,7 +577,7 @@
apropos_cmd (struct ui_file *stream, struct cmd_list_element *commandlist,
struct re_pattern_buffer *regex, char *prefix)
{
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
int returnvalue=1; /*Needed to avoid double printing*/
/* Walk through the commands */
for (c=commandlist;c;c=c->next)
@@ -786,7 +786,7 @@
{
static char *line_buffer = 0;
static int line_size;
- register char *p;
+ char *p;
if (!line_buffer)
{
@@ -830,7 +830,7 @@
help_cmd_list (struct cmd_list_element *list, enum command_class class,
char *prefix, int recurse, struct ui_file *stream)
{
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
for (c = list; c; c = c->next)
{
Index: cli/cli-script.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-script.c,v
retrieving revision 1.18
diff -u -r1.18 cli-script.c
--- cli/cli-script.c 5 Aug 2003 02:44:50 -0000 1.18
+++ cli/cli-script.c 20 Sep 2003 17:48:42 -0000
@@ -255,7 +255,7 @@
void
execute_user_command (struct cmd_list_element *c, char *args)
{
- register struct command_line *cmdlines;
+ struct command_line *cmdlines;
struct cleanup *old_chain;
enum command_control_type ret;
static int user_call_depth = 0;
@@ -974,8 +974,8 @@
void
free_command_lines (struct command_line **lptr)
{
- register struct command_line *l = *lptr;
- register struct command_line *next;
+ struct command_line *l = *lptr;
+ struct command_line *next;
struct command_line **blist;
int i;
@@ -1040,7 +1040,7 @@
static void
validate_comname (char *comname)
{
- register char *p;
+ char *p;
if (comname == 0)
error_no_arg ("name of command to define");
@@ -1070,8 +1070,8 @@
CMD_PRE_HOOK,
CMD_POST_HOOK
};
- register struct command_line *cmds;
- register struct cmd_list_element *c, *newc, *oldc, *hookc = 0;
+ struct command_line *cmds;
+ struct cmd_list_element *c, *newc, *oldc, *hookc = 0;
char *tem = comname;
char *tem2;
char tmpbuf[MAX_TMPBUF];
@@ -1176,7 +1176,7 @@
document_command (char *comname, int from_tty)
{
struct command_line *doclines;
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
char *tem = comname;
char tmpbuf[128];
@@ -1194,8 +1194,8 @@
xfree (c->doc);
{
- register struct command_line *cl1;
- register int len = 0;
+ struct command_line *cl1;
+ int len = 0;
for (cl1 = doclines; cl1; cl1 = cl1->next)
len += strlen (cl1->line) + 1;
@@ -1290,7 +1290,7 @@
void
show_user_1 (struct cmd_list_element *c, struct ui_file *stream)
{
- register struct command_line *cmdlines;
+ struct command_line *cmdlines;
cmdlines = c->user_commands;
if (!cmdlines)
Index: config/pa/tm-hppa.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/tm-hppa.h,v
retrieving revision 1.56
diff -u -r1.56 tm-hppa.h
--- config/pa/tm-hppa.h 22 Aug 2003 00:35:32 -0000 1.56
+++ config/pa/tm-hppa.h 20 Sep 2003 17:48:42 -0000
@@ -119,7 +119,7 @@
specified in the calling convention doc. As far as I know, the only
way to get the return value is to have the caller tell us where it
told the callee to put it, rather than have the callee tell us. */
-struct value *hppa_value_returned_from_stack (register struct type *valtype,
+struct value *hppa_value_returned_from_stack (struct type *valtype,
CORE_ADDR addr);
#define VALUE_RETURNED_FROM_STACK(valtype,addr) \
hppa_value_returned_from_stack (valtype, addr)
Index: mi/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/mi/ChangeLog,v
retrieving revision 1.119
diff -u -r1.119 ChangeLog
--- mi/ChangeLog 17 Sep 2003 14:24:31 -0000 1.119
+++ mi/ChangeLog 20 Sep 2003 17:48:43 -0000
@@ -1,3 +1,7 @@
+2003-09-20 Andrew Cagney <cagney@redhat.com>
+
+ * mi-main.c (get_register):
+
2003-09-17 Andrew Cagney <cagney@redhat.com>
* mi/mi-main.c: Rename REGISTER_BYTE to DEPRECATED_REGISTER_BYTE.
Index: mi/mi-main.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
retrieving revision 1.53
diff -u -r1.53 mi-main.c
--- mi/mi-main.c 17 Sep 2003 14:24:31 -0000 1.53
+++ mi/mi-main.c 20 Sep 2003 17:48:43 -0000
@@ -555,7 +555,7 @@
ptr = buf + 2;
for (j = 0; j < REGISTER_RAW_SIZE (regnum); j++)
{
- register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
+ int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
: REGISTER_RAW_SIZE (regnum) - 1 - j;
sprintf (ptr, "%02x", (unsigned char) raw_buffer[idx]);
ptr += 2;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [ob] Last remaining "register" attributes
2003-09-20 17:51 [ob] Last remaining "register" attributes Andrew Cagney
@ 2003-09-25 16:27 ` David Carlton
2003-09-25 16:52 ` David Carlton
0 siblings, 1 reply; 3+ messages in thread
From: David Carlton @ 2003-09-25 16:27 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
On Sat, 20 Sep 2003 13:51:04 -0400, Andrew Cagney <ac131313@redhat.com> said:
> Hopefully :-)
I just saw one in c-exp.y, alas... I'll go through the .y files and
get rid of them in a bit, once I'm done revising a patch.
David Carlton
carlton@kealia.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ob] Last remaining "register" attributes
2003-09-25 16:27 ` David Carlton
@ 2003-09-25 16:52 ` David Carlton
0 siblings, 0 replies; 3+ messages in thread
From: David Carlton @ 2003-09-25 16:52 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
On Thu, 25 Sep 2003 09:27:00 -0700, David Carlton <carlton@kealia.com> said:
> On Sat, 20 Sep 2003 13:51:04 -0400, Andrew Cagney <ac131313@redhat.com> said:
>> Hopefully :-)
> I just saw one in c-exp.y, alas... I'll go through the .y files and
> get rid of them in a bit, once I'm done revising a patch.
Here it is; committed as obvious (after testing on i686-pc-linux-gnu,
GCC 3.2, DWARF 2, with compilers for many but not all of the relevant
languages). There are some K&Risms in the parsers, too, if you're
looking for more mindless cleanups.
David Carlton
carlton@kealia.com
2003-09-25 David Carlton <carlton@kealia.com>
* c-exp.y: Remove 'register' declarations.
* f-exp.y, jv-exp.y, m2-exp.y, objc-exp.y, p-exp.y: Ditto.
Index: c-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/c-exp.y,v
retrieving revision 1.22
diff -u -p -r1.22 c-exp.y
--- c-exp.y 25 Sep 2003 16:39:38 -0000 1.22
+++ c-exp.y 25 Sep 2003 16:44:12 -0000
@@ -704,7 +704,7 @@ variable: name_not_typename
else
{
struct minimal_symbol *msymbol;
- register char *arg = copy_name ($1.stoken);
+ char *arg = copy_name ($1.stoken);
msymbol =
lookup_minimal_symbol (arg, NULL, NULL);
@@ -1047,20 +1047,20 @@ name_not_typename : NAME
static int
parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
+ char *p;
+ int len;
int parsed_float;
YYSTYPE *putithere;
{
/* FIXME: Shouldn't these be unsigned? We don't deal with negative values
here, and we do kind of silly things like cast to unsigned. */
- register LONGEST n = 0;
- register LONGEST prevn = 0;
+ LONGEST n = 0;
+ LONGEST prevn = 0;
ULONGEST un;
- register int i = 0;
- register int c;
- register int base = input_radix;
+ int i = 0;
+ int c;
+ int base = input_radix;
int unsigned_p = 0;
/* Number of "L" suffixes encountered. */
@@ -1457,7 +1457,7 @@ yylex ()
{
/* It's a number. */
int got_dot = 0, got_e = 0, toktype;
- register char *p = tokstart;
+ char *p = tokstart;
int hex = input_radix > 10;
if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
Index: f-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/f-exp.y,v
retrieving revision 1.12
diff -u -p -r1.12 f-exp.y
--- f-exp.y 14 May 2003 17:43:17 -0000 1.12
+++ f-exp.y 25 Sep 2003 16:44:12 -0000
@@ -476,7 +476,7 @@ variable: name_not_typename
else
{
struct minimal_symbol *msymbol;
- register char *arg = copy_name ($1.stoken);
+ char *arg = copy_name ($1.stoken);
msymbol =
lookup_minimal_symbol (arg, NULL, NULL);
@@ -641,15 +641,15 @@ name_not_typename : NAME
static int
parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
+ char *p;
+ int len;
int parsed_float;
YYSTYPE *putithere;
{
- register LONGEST n = 0;
- register LONGEST prevn = 0;
- register int c;
- register int base = input_radix;
+ LONGEST n = 0;
+ LONGEST prevn = 0;
+ int c;
+ int base = input_radix;
int unsigned_p = 0;
int long_p = 0;
ULONGEST high_bit;
@@ -1018,7 +1018,7 @@ yylex ()
{
/* It's a number. */
int got_dot = 0, got_e = 0, got_d = 0, toktype;
- register char *p = tokstart;
+ char *p = tokstart;
int hex = input_radix > 10;
if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
Index: jv-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/jv-exp.y,v
retrieving revision 1.15
diff -u -p -r1.15 jv-exp.y
--- jv-exp.y 8 Jun 2003 18:27:13 -0000 1.15
+++ jv-exp.y 25 Sep 2003 16:44:13 -0000
@@ -682,16 +682,16 @@ Expression:
static int
parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
+ char *p;
+ int len;
int parsed_float;
YYSTYPE *putithere;
{
- register ULONGEST n = 0;
+ ULONGEST n = 0;
ULONGEST limit, limit_div_base;
- register int c;
- register int base = input_radix;
+ int c;
+ int base = input_radix;
struct type *type;
@@ -967,7 +967,7 @@ yylex ()
{
/* It's a number. */
int got_dot = 0, got_e = 0, toktype;
- register char *p = tokstart;
+ char *p = tokstart;
int hex = input_radix > 10;
if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
Index: m2-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/m2-exp.y,v
retrieving revision 1.10
diff -u -p -r1.10 m2-exp.y
--- m2-exp.y 14 May 2003 17:43:18 -0000 1.10
+++ m2-exp.y 25 Sep 2003 16:44:13 -0000
@@ -617,7 +617,7 @@ variable: NAME
else
{
struct minimal_symbol *msymbol;
- register char *arg = copy_name ($1);
+ char *arg = copy_name ($1);
msymbol =
lookup_minimal_symbol (arg, NULL, NULL);
@@ -672,12 +672,12 @@ static int
parse_number (olen)
int olen;
{
- register char *p = lexptr;
- register LONGEST n = 0;
- register LONGEST prevn = 0;
- register int c,i,ischar=0;
- register int base = input_radix;
- register int len = olen;
+ char *p = lexptr;
+ LONGEST n = 0;
+ LONGEST prevn = 0;
+ int c,i,ischar=0;
+ int base = input_radix;
+ int len = olen;
int unsigned_p = number_sign == 1 ? 1 : 0;
if(p[len-1] == 'H')
@@ -820,11 +820,11 @@ static struct keyword keytab[] =
static int
yylex ()
{
- register int c;
- register int namelen;
- register int i;
- register char *tokstart;
- register char quote;
+ int c;
+ int namelen;
+ int i;
+ char *tokstart;
+ char quote;
retry:
@@ -936,7 +936,7 @@ yylex ()
{
/* It's a number. */
int got_dot = 0, got_e = 0;
- register char *p = tokstart;
+ char *p = tokstart;
int toktype;
for (++p ;; ++p)
Index: objc-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/objc-exp.y,v
retrieving revision 1.13
diff -u -p -r1.13 objc-exp.y
--- objc-exp.y 8 Jun 2003 18:27:14 -0000 1.13
+++ objc-exp.y 25 Sep 2003 16:44:13 -0000
@@ -769,7 +769,7 @@ variable: name_not_typename
else
{
struct minimal_symbol *msymbol;
- register char *arg = copy_name ($1.stoken);
+ char *arg = copy_name ($1.stoken);
msymbol =
lookup_minimal_symbol (arg, NULL, NULL);
@@ -992,21 +992,21 @@ name_not_typename : NAME
static int
parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
+ char *p;
+ int len;
int parsed_float;
YYSTYPE *putithere;
{
/* FIXME: Shouldn't these be unsigned? We don't deal with negative
values here, and we do kind of silly things like cast to
unsigned. */
- register LONGEST n = 0;
- register LONGEST prevn = 0;
+ LONGEST n = 0;
+ LONGEST prevn = 0;
unsigned LONGEST un;
- register int i = 0;
- register int c;
- register int base = input_radix;
+ int i = 0;
+ int c;
+ int base = input_radix;
int unsigned_p = 0;
/* Number of "L" suffixes encountered. */
@@ -1362,7 +1362,7 @@ yylex ()
/* It's a number. */
int got_dot = 0, got_e = 0, toktype = FLOAT;
/* Initialize toktype to anything other than ERROR. */
- register char *p = tokstart;
+ char *p = tokstart;
int hex = input_radix > 10;
int local_radix = input_radix;
if (tokchr == '0' && (p[1] == 'x' || p[1] == 'X'))
Index: p-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/p-exp.y,v
retrieving revision 1.24
diff -u -p -r1.24 p-exp.y
--- p-exp.y 8 Jun 2003 18:27:14 -0000 1.24
+++ p-exp.y 25 Sep 2003 16:44:13 -0000
@@ -685,7 +685,7 @@ variable: name_not_typename
else
{
struct minimal_symbol *msymbol;
- register char *arg = copy_name ($1.stoken);
+ char *arg = copy_name ($1.stoken);
msymbol =
lookup_minimal_symbol (arg, NULL, NULL);
@@ -764,20 +764,20 @@ name_not_typename : NAME
static int
parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
+ char *p;
+ int len;
int parsed_float;
YYSTYPE *putithere;
{
/* FIXME: Shouldn't these be unsigned? We don't deal with negative values
here, and we do kind of silly things like cast to unsigned. */
- register LONGEST n = 0;
- register LONGEST prevn = 0;
+ LONGEST n = 0;
+ LONGEST prevn = 0;
ULONGEST un;
- register int i = 0;
- register int c;
- register int base = input_radix;
+ int i = 0;
+ int c;
+ int base = input_radix;
int unsigned_p = 0;
/* Number of "L" suffixes encountered. */
@@ -1189,7 +1189,7 @@ yylex ()
{
/* It's a number. */
int got_dot = 0, got_e = 0, toktype;
- register char *p = tokstart;
+ char *p = tokstart;
int hex = input_radix > 10;
if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-09-25 16:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-20 17:51 [ob] Last remaining "register" attributes Andrew Cagney
2003-09-25 16:27 ` David Carlton
2003-09-25 16:52 ` David Carlton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox