2010-12-15 Greg Watson <g.watson@computer.org>
authorTom Tromey <tromey@redhat.com>
Wed, 15 Dec 2010 19:28:31 +0000 (19:28 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 15 Dec 2010 19:28:31 +0000 (19:28 +0000)
* f-exp.y (yylex): Check entire token against keywords.

gdb/ChangeLog
gdb/f-exp.y

index 48a381f7722f7e3b571a26cf891f74c8b84d82eb..013ff837c890feb5635a4dbe0a475433d08e3dfe 100644 (file)
@@ -1,3 +1,7 @@
+2010-12-15  Greg Watson  <g.watson@computer.org>
+
+       * f-exp.y (yylex): Check entire token against keywords.
+
 2010-12-15  Doug Evans  <dje@google.com>
 
        Rename "maint set python auto-load" to "set auto-load-scripts".
index 415819a0fc82bc83e27fdae76958219aa6713876..feffe7999bc1b26fa141842edc74733337579a37 100644 (file)
@@ -1150,8 +1150,8 @@ yylex ()
   /* Catch specific keywords.  */
   
   for (i = 0; f77_keywords[i].operator != NULL; i++)
-    if (strncmp (tokstart, f77_keywords[i].operator,
-                strlen(f77_keywords[i].operator)) == 0)
+    if (strlen (f77_keywords[i].operator) == namelen
+       && strncmp (tokstart, f77_keywords[i].operator, namelen) == 0)
       {
        /*      lexptr += strlen(f77_keywords[i].operator); */ 
        yylval.opcode = f77_keywords[i].opcode;