aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-04-28 01:03:24 +0000
committerTom Tromey <tromey@redhat.com>2009-04-28 01:03:24 +0000
commit379a77b5484ba0d8f29983175acb2b968f56785a (patch)
treedfae15384cc4323f6d31d1f683ba5d53cd7a9930 /gdb/c-exp.y
parent0c19b345c9a8842f3d62da61880ed5bc15d2d2f9 (diff)
downloadgdb-379a77b5484ba0d8f29983175acb2b968f56785a.zip
gdb-379a77b5484ba0d8f29983175acb2b968f56785a.tar.gz
gdb-379a77b5484ba0d8f29983175acb2b968f56785a.tar.bz2
gdb
* c-exp.y (yylex): Handle '[' and ']' like '(' and ')'. gdb/testsuite * gdb.base/printcmds.exp (test_printf): Test comma operator in [].
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r--gdb/c-exp.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 92d6c21..688c060 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -1885,11 +1885,13 @@ yylex ()
lexptr++;
goto retry;
+ case '[':
case '(':
paren_depth++;
lexptr++;
return c;
+ case ']':
case ')':
if (paren_depth == 0)
return 0;
@@ -1991,8 +1993,6 @@ yylex ()
case '@':
case '<':
case '>':
- case '[':
- case ']':
case '?':
case ':':
case '=':