| Index: gdb/cp-name-parser.y
|
| diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y
|
| index 6767fa5fde5a0c7da6ee4de78d8bae99d1202ff7..01a1fa49671fa31f6e8c02abe52a4008268fcfe6 100644
|
| --- a/gdb/cp-name-parser.y
|
| +++ b/gdb/cp-name-parser.y
|
| @@ -1,6 +1,6 @@
|
| /* YACC parser for C++ names, for GDB.
|
|
|
| - Copyright (C) 2003-2005, 2007-2012 Free Software Foundation, Inc.
|
| + Copyright (C) 2003-2013 Free Software Foundation, Inc.
|
|
|
| Parts of the lexer are based on c-exp.y from GDB.
|
|
|
| @@ -446,13 +446,29 @@ demangler_special
|
| ;
|
|
|
| operator : OPERATOR NEW
|
| - { $$ = make_operator ("new", 3); }
|
| + {
|
| + /* Match the whitespacing of cplus_demangle_operators.
|
| + It would abort on unrecognized string otherwise. */
|
| + $$ = make_operator ("new", 3);
|
| + }
|
| | OPERATOR DELETE
|
| - { $$ = make_operator ("delete ", 1); }
|
| + {
|
| + /* Match the whitespacing of cplus_demangle_operators.
|
| + It would abort on unrecognized string otherwise. */
|
| + $$ = make_operator ("delete ", 1);
|
| + }
|
| | OPERATOR NEW '[' ']'
|
| - { $$ = make_operator ("new[]", 3); }
|
| + {
|
| + /* Match the whitespacing of cplus_demangle_operators.
|
| + It would abort on unrecognized string otherwise. */
|
| + $$ = make_operator ("new[]", 3);
|
| + }
|
| | OPERATOR DELETE '[' ']'
|
| - { $$ = make_operator ("delete[] ", 1); }
|
| + {
|
| + /* Match the whitespacing of cplus_demangle_operators.
|
| + It would abort on unrecognized string otherwise. */
|
| + $$ = make_operator ("delete[] ", 1);
|
| + }
|
| | OPERATOR '+'
|
| { $$ = make_operator ("+", 2); }
|
| | OPERATOR '-'
|
| @@ -1183,7 +1199,11 @@ exp : FLOAT
|
| ;
|
|
|
| exp : SIZEOF '(' type ')' %prec UNARY
|
| - { $$ = d_unary ("sizeof", $3); }
|
| + {
|
| + /* Match the whitespacing of cplus_demangle_operators.
|
| + It would abort on unrecognized string otherwise. */
|
| + $$ = d_unary ("sizeof ", $3);
|
| + }
|
| ;
|
|
|
| /* C++. */
|
|
|