diff options
author | Tom Tromey <tromey@redhat.com> | 2010-12-15 19:28:31 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-12-15 19:28:31 +0000 |
commit | 45ccdddcbfd0eea3165b732191613dc85f016b8c (patch) | |
tree | 13dc6372d657f40e3c03a9c8e887c7e6b7efd1cd | |
parent | a86caf66bb66054f86ef6bed3c5fa6d68444734b (diff) | |
download | gdb-45ccdddcbfd0eea3165b732191613dc85f016b8c.zip gdb-45ccdddcbfd0eea3165b732191613dc85f016b8c.tar.gz gdb-45ccdddcbfd0eea3165b732191613dc85f016b8c.tar.bz2 |
2010-12-15 Greg Watson <g.watson@computer.org>
* f-exp.y (yylex): Check entire token against keywords.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/f-exp.y | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 48a381f..013ff83 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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". diff --git a/gdb/f-exp.y b/gdb/f-exp.y index 415819a..feffe79 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -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; |