summaryrefslogtreecommitdiff
path: root/gdb/ch-exp.y
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1993-04-28 20:36:48 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1993-04-28 20:36:48 +0000
commitd8f233201baa7f3f6361a268587013694e160231 (patch)
tree851406e4f92945a68124b4d3e2b5005b7cdd8448 /gdb/ch-exp.y
parentc1fb4e4913bcf33113b3cbfcaa091375cc862755 (diff)
downloadbinutils-gdb-d8f233201baa7f3f6361a268587013694e160231.tar.gz
* ch-exp.y (yylex): Don't STREQ with simplename if it is NULL.
Diffstat (limited to 'gdb/ch-exp.y')
-rw-r--r--gdb/ch-exp.y42
1 files changed, 21 insertions, 21 deletions
diff --git a/gdb/ch-exp.y b/gdb/ch-exp.y
index 952e2b38d2b..2789d76767a 100644
--- a/gdb/ch-exp.y
+++ b/gdb/ch-exp.y
@@ -1883,29 +1883,29 @@ yylex ()
simplename = match_simple_name_string ();
- /* See if it is a reserved identifier. */
- for (i = 0; i < sizeof (idtokentab) / sizeof (idtokentab[0]); i++)
- {
- if (STREQ (simplename, idtokentab[i].operator))
- {
- return (idtokentab[i].token);
- }
- }
-
- /* Look for other special tokens. */
- if (STREQ (simplename, "true"))
- {
- yylval.ulval = 1;
- return (BOOLEAN_LITERAL);
- }
- if (STREQ (simplename, "false"))
- {
- yylval.ulval = 0;
- return (BOOLEAN_LITERAL);
- }
-
if (simplename != NULL)
{
+ /* See if it is a reserved identifier. */
+ for (i = 0; i < sizeof (idtokentab) / sizeof (idtokentab[0]); i++)
+ {
+ if (STREQ (simplename, idtokentab[i].operator))
+ {
+ return (idtokentab[i].token);
+ }
+ }
+
+ /* Look for other special tokens. */
+ if (STREQ (simplename, "true"))
+ {
+ yylval.ulval = 1;
+ return (BOOLEAN_LITERAL);
+ }
+ if (STREQ (simplename, "false"))
+ {
+ yylval.ulval = 0;
+ return (BOOLEAN_LITERAL);
+ }
+
sym = lookup_symbol (simplename, expression_context_block,
VAR_NAMESPACE, (int *) NULL,
(struct symtab **) NULL);