From: David Carlton <carlton@kealia.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [ob] Last remaining "register" attributes
Date: Thu, 25 Sep 2003 16:52:00 -0000 [thread overview]
Message-ID: <yf2k77w24k7.fsf@hawaii.kealia.com> (raw)
In-Reply-To: <yf2smmk25rf.fsf@hawaii.kealia.com> (David Carlton's message of "Thu, 25 Sep 2003 09:27:00 -0700")
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'))
prev parent reply other threads:[~2003-09-25 16:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-20 17:51 Andrew Cagney
2003-09-25 16:27 ` David Carlton
2003-09-25 16:52 ` David Carlton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yf2k77w24k7.fsf@hawaii.kealia.com \
--to=carlton@kealia.com \
--cc=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox