aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorKung Hsu <kung@cygnus>1994-11-16 00:21:16 +0000
committerKung Hsu <kung@cygnus>1994-11-16 00:21:16 +0000
commite38e7f47a8bde45413d94878b5e9250d8f22cb4e (patch)
tree45107dddffddbe3e74f36e6735561d13bce75a97 /gdb
parent2d4838fe0dcca00186f623dce94352572ec05dae (diff)
downloadgdb-e38e7f47a8bde45413d94878b5e9250d8f22cb4e.zip
gdb-e38e7f47a8bde45413d94878b5e9250d8f22cb4e.tar.gz
gdb-e38e7f47a8bde45413d94878b5e9250d8f22cb4e.tar.bz2
* c-exp.y (yylex): Fix a bug in template scanning.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/c-exp.y7
2 files changed, 10 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b71aaa0..b4ba7c7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+Tue Nov 15 16:18:52 1994 Kung Hsu (kung@mexican.cygnus.com)
+
+ * c-exp.y (yylex): Fix a bug in template scanning.
+
Tue Nov 15 14:25:47 1994 Stan Shebs (shebs@andros.cygnus.com)
* i386-stub.c, m68k-stub.c, sparc-stub.c, sparcl-stub.c: Mask out
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index bb87545..e8b0d7e 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -1366,7 +1366,12 @@ yylex ()
|| (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '<');)
{
if (c == '<')
- while (tokstart[++namelen] != '>');
+ {
+ int i = namelen;
+ while (tokstart[++i] && tokstart[i] != '>');
+ if (tokstart[i] == '>')
+ namelen = i;
+ }
c = tokstart[++namelen];
}