* c-exp.y (yylex): Handle '[' and ']' like '(' and ')'.
gdb/testsuite
	* gdb.base/printcmds.exp (test_printf): Test comma operator in [].
This commit is contained in:
Tom Tromey
2009-04-28 01:03:24 +00:00
parent 0c19b345c9
commit 379a77b548
4 changed files with 13 additions and 2 deletions

View File

@ -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 '=':