From: Ondrej Oprala <ooprala@redhat.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@redhat.com>
Subject: [PATCH 10/18] poison "operator"
Date: Mon, 21 Oct 2013 15:37:00 -0000 [thread overview]
Message-ID: <1382369846-5817-11-git-send-email-ooprala@redhat.com> (raw)
In-Reply-To: <1382369846-5817-1-git-send-email-ooprala@redhat.com>
From: Tom Tromey <tromey@redhat.com>
gdb/ChangeLog
2013-10-21 Tom Tromey <tromey@redhat.com>
* c-exp.y (oper): Renamed from operator.
* f-exp.y (oper): Likewise.
* go-exp.y (oper): Likewise.
* jv-exp.y (oper): Likewise.
* p-exp.y (oper): Likewise.
* valarith.c (oper): Likewise.
---
gdb/c-exp.y | 8 ++++----
gdb/f-exp.y | 18 +++++++++---------
gdb/go-exp.y | 8 ++++----
gdb/jv-exp.y | 6 +++---
gdb/p-exp.y | 10 +++++-----
gdb/valarith.c | 6 +++---
6 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index a796dbb..6d50c0c 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -2223,7 +2223,7 @@ enum token_flags
struct token
{
- char *operator;
+ char *oper;
int token;
enum exp_opcode opcode;
enum token_flags flags;
@@ -2444,7 +2444,7 @@ lex_one_token (void)
tokstart = lexptr;
/* See if it is a special token of length 3. */
for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
- if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
+ if (strncmp (tokstart, tokentab3[i].oper, 3) == 0)
{
if ((tokentab3[i].flags & FLAG_CXX) != 0
&& parse_language->la_language != language_cplus)
@@ -2457,7 +2457,7 @@ lex_one_token (void)
/* See if it is a special token of length 2. */
for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
- if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
+ if (strncmp (tokstart, tokentab2[i].oper, 2) == 0)
{
if ((tokentab2[i].flags & FLAG_CXX) != 0
&& parse_language->la_language != language_cplus)
@@ -2751,7 +2751,7 @@ lex_one_token (void)
/* Catch specific keywords. */
copy = copy_name (yylval.sval);
for (i = 0; i < sizeof ident_tokens / sizeof ident_tokens[0]; i++)
- if (strcmp (copy, ident_tokens[i].operator) == 0)
+ if (strcmp (copy, ident_tokens[i].oper) == 0)
{
if ((ident_tokens[i].flags & FLAG_CXX) != 0
&& parse_language->la_language != language_cplus)
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 59c5e6c..fcaccdf 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -806,7 +806,7 @@ parse_number (const char *p, int len, int parsed_float, YYSTYPE *putithere)
struct token
{
- char *operator;
+ char *oper;
int token;
enum exp_opcode opcode;
};
@@ -982,11 +982,11 @@ yylex (void)
/* See if it is a special .foo. operator. */
- for (i = 0; dot_ops[i].operator != NULL; i++)
- if (strncmp (tokstart, dot_ops[i].operator,
- strlen (dot_ops[i].operator)) == 0)
+ for (i = 0; dot_ops[i].oper != NULL; i++)
+ if (strncmp (tokstart, dot_ops[i].oper,
+ strlen (dot_ops[i].oper)) == 0)
{
- lexptr += strlen (dot_ops[i].operator);
+ lexptr += strlen (dot_ops[i].oper);
yylval.opcode = dot_ops[i].opcode;
return dot_ops[i].token;
}
@@ -1150,11 +1150,11 @@ yylex (void)
/* Catch specific keywords. */
- for (i = 0; f77_keywords[i].operator != NULL; i++)
- if (strlen (f77_keywords[i].operator) == namelen
- && strncmp (tokstart, f77_keywords[i].operator, namelen) == 0)
+ for (i = 0; f77_keywords[i].oper != NULL; i++)
+ if (strlen (f77_keywords[i].oper) == namelen
+ && strncmp (tokstart, f77_keywords[i].oper, namelen) == 0)
{
- /* lexptr += strlen(f77_keywords[i].operator); */
+ /* lexptr += strlen(f77_keywords[i].oper); */
yylval.opcode = f77_keywords[i].opcode;
return f77_keywords[i].token;
}
diff --git a/gdb/go-exp.y b/gdb/go-exp.y
index 01c382a..412de64 100644
--- a/gdb/go-exp.y
+++ b/gdb/go-exp.y
@@ -975,7 +975,7 @@ parse_string_or_char (const char *tokptr, const char **outptr,
struct token
{
- char *operator;
+ char *oper;
int token;
enum exp_opcode opcode;
};
@@ -1062,7 +1062,7 @@ lex_one_token (void)
tokstart = lexptr;
/* See if it is a special token of length 3. */
for (i = 0; i < sizeof (tokentab3) / sizeof (tokentab3[0]); i++)
- if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
+ if (strncmp (tokstart, tokentab3[i].oper, 3) == 0)
{
lexptr += 3;
yylval.opcode = tokentab3[i].opcode;
@@ -1071,7 +1071,7 @@ lex_one_token (void)
/* See if it is a special token of length 2. */
for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
- if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
+ if (strncmp (tokstart, tokentab2[i].oper, 2) == 0)
{
lexptr += 2;
yylval.opcode = tokentab2[i].opcode;
@@ -1301,7 +1301,7 @@ lex_one_token (void)
/* Catch specific keywords. */
copy = copy_name (yylval.sval);
for (i = 0; i < sizeof (ident_tokens) / sizeof (ident_tokens[0]); i++)
- if (strcmp (copy, ident_tokens[i].operator) == 0)
+ if (strcmp (copy, ident_tokens[i].oper) == 0)
{
/* It is ok to always set this, even though we don't always
strictly need to. */
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y
index e4b1cec..5e4503e 100644
--- a/gdb/jv-exp.y
+++ b/gdb/jv-exp.y
@@ -821,7 +821,7 @@ parse_number (const char *p, int len, int parsed_float, YYSTYPE *putithere)
struct token
{
- char *operator;
+ char *oper;
int token;
enum exp_opcode opcode;
};
@@ -875,7 +875,7 @@ yylex (void)
tokstart = lexptr;
/* See if it is a special token of length 3. */
for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
- if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
+ if (strncmp (tokstart, tokentab3[i].oper, 3) == 0)
{
lexptr += 3;
yylval.opcode = tokentab3[i].opcode;
@@ -884,7 +884,7 @@ yylex (void)
/* See if it is a special token of length 2. */
for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
- if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
+ if (strncmp (tokstart, tokentab2[i].oper, 2) == 0)
{
lexptr += 2;
yylval.opcode = tokentab2[i].opcode;
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index de14cbb..41207ed 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -1075,7 +1075,7 @@ pop_current_type (void)
struct token
{
- char *operator;
+ char *oper;
int token;
enum exp_opcode opcode;
};
@@ -1153,8 +1153,8 @@ yylex (void)
/* See if it is a special token of length 3. */
if (explen > 2)
for (i = 0; i < sizeof (tokentab3) / sizeof (tokentab3[0]); i++)
- if (strncasecmp (tokstart, tokentab3[i].operator, 3) == 0
- && (!isalpha (tokentab3[i].operator[0]) || explen == 3
+ if (strncasecmp (tokstart, tokentab3[i].oper, 3) == 0
+ && (!isalpha (tokentab3[i].oper[0]) || explen == 3
|| (!isalpha (tokstart[3])
&& !isdigit (tokstart[3]) && tokstart[3] != '_')))
{
@@ -1166,8 +1166,8 @@ yylex (void)
/* See if it is a special token of length 2. */
if (explen > 1)
for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
- if (strncasecmp (tokstart, tokentab2[i].operator, 2) == 0
- && (!isalpha (tokentab2[i].operator[0]) || explen == 2
+ if (strncasecmp (tokstart, tokentab2[i].oper, 2) == 0
+ && (!isalpha (tokentab2[i].oper[0]) || explen == 2
|| (!isalpha (tokstart[2])
&& !isdigit (tokstart[2]) && tokstart[2] != '_')))
{
diff --git a/gdb/valarith.c b/gdb/valarith.c
index 18c14fc..b50bd21 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -286,14 +286,14 @@ unop_user_defined_p (enum exp_opcode op, struct value *arg1)
situations or combinations thereof. */
static struct value *
-value_user_defined_cpp_op (struct value **args, int nargs, char *operator,
+value_user_defined_cpp_op (struct value **args, int nargs, char *oper,
int *static_memfuncp)
{
struct symbol *symp = NULL;
struct value *valp = NULL;
- find_overload_match (args, nargs, operator, BOTH /* could be method */,
+ find_overload_match (args, nargs, oper, BOTH /* could be method */,
&args[0] /* objp */,
NULL /* pass NULL symbol since symbol is unknown */,
&valp, &symp, static_memfuncp, 0);
@@ -310,7 +310,7 @@ value_user_defined_cpp_op (struct value **args, int nargs, char *operator,
return value_of_variable (symp, 0);
}
- error (_("Could not find %s."), operator);
+ error (_("Could not find %s."), oper);
}
/* Lookup user defined operator NAME. Return a value representing the
--
1.8.3.1
next prev parent reply other threads:[~2013-10-21 15:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-21 15:37 [PATCH 00/18] -Wc++-compat patches v2.0 Ondrej Oprala
2013-10-21 15:37 ` [PATCH 13/18] poison "typename" Ondrej Oprala
2013-10-21 15:37 ` [PATCH 17/18] fix gdbarch buglet Ondrej Oprala
2013-10-21 16:00 ` Pedro Alves
2013-10-22 6:20 ` Ondrej Oprala
2013-10-21 15:37 ` [PATCH 15/18] fix up vec Ondrej Oprala
2013-10-21 15:37 ` [PATCH 01/18] poison "class" Ondrej Oprala
2013-10-21 15:37 ` [PATCH 09/18] poison "namespace" Ondrej Oprala
2013-10-21 15:37 ` [PATCH 11/18] poison "template" Ondrej Oprala
2013-10-21 15:37 ` [PATCH 18/18] un-nest enum pvk Ondrej Oprala
2013-10-21 15:37 ` [PATCH 05/18] poison "private" Ondrej Oprala
2013-10-21 15:37 ` [PATCH 07/18] poison "explicit" Ondrej Oprala
2013-10-21 15:37 ` Ondrej Oprala [this message]
2013-10-21 15:37 ` [PATCH 02/18] poison "new" Ondrej Oprala
2013-10-21 15:37 ` [PATCH 12/18] poison "try" Ondrej Oprala
2013-10-21 15:37 ` [PATCH 03/18] poison "this" Ondrej Oprala
2013-10-21 15:37 ` [PATCH 14/18] poison "using" Ondrej Oprala
2013-10-21 15:37 ` [PATCH 08/18] poison "mutable" Ondrej Oprala
2013-10-21 15:58 ` [PATCH 16/18] fix up gdbtypes.h Ondrej Oprala
2013-10-21 16:11 ` [PATCH 06/18] poison "delete" Ondrej Oprala
2013-10-21 17:00 ` [PATCH 04/18] poison "public" Ondrej Oprala
-- strict thread matches above, loose matches on Subject: below --
2013-10-09 17:17 [PATCH 00/18] -Wc++-compat patches Ondrej Oprala
2013-10-09 17:18 ` [PATCH 10/18] poison "operator" Ondrej Oprala
2013-10-13 17:20 ` Jan Kratochvil
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=1382369846-5817-11-git-send-email-ooprala@redhat.com \
--to=ooprala@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).