summaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-04-28 01:03:21 +0000
committerTom Tromey <tromey@redhat.com>2009-04-28 01:03:21 +0000
commit5b754aed7e552fb5dc279a43778e645fff963c63 (patch)
tree87ad7af9fe57d79ae5c44e9f27870f36b6807e82 /gdb/c-exp.y
parent9733feda3307b74cbb8baa0754b984440aa2118d (diff)
downloadgdb-5b754aed7e552fb5dc279a43778e645fff963c63.tar.gz
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 92d6c215a5e..688c060ef2e 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 '=':