mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
gdb
* 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:
@ -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 '=':
|
||||
|
Reference in New Issue
Block a user