diff options
author | Tom Tromey <tromey@redhat.com> | 2009-04-28 01:03:21 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2009-04-28 01:03:21 +0000 |
commit | 5b754aed7e552fb5dc279a43778e645fff963c63 (patch) | |
tree | 87ad7af9fe57d79ae5c44e9f27870f36b6807e82 /gdb/c-exp.y | |
parent | 9733feda3307b74cbb8baa0754b984440aa2118d (diff) | |
download | gdb-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.y | 4 |
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 '=': |