mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +00:00
tests: fix a G++ warning
* tests/c++.at: Use YY_NULL instead of 0 for the null pointer. And formatting changes.
This commit is contained in:
14
tests/c++.at
14
tests/c++.at
@@ -790,16 +790,16 @@ list:
|
|||||||
;
|
;
|
||||||
|
|
||||||
item:
|
item:
|
||||||
'a' { $$][ = $][1; }
|
'a' { $$][ = $][1; }
|
||||||
| 'e' { YYUSE ($][$); YYUSE($][1); error ("syntax error"); }
|
| 'e' { YYUSE ($][$); YYUSE($][1); error ("syntax error"); }
|
||||||
// Not just 'E', otherwise we reduce when 'E' is the lookahead, and
|
// Not just 'E', otherwise we reduce when 'E' is the lookahead, and
|
||||||
// then the stack is emptied, defeating the point of the test.
|
// then the stack is emptied, defeating the point of the test.
|
||||||
| 'E' 'a' { YYUSE($][1); $][$ = $][2; }
|
| 'E' 'a' { YYUSE($][1); $][$ = $][2; }
|
||||||
| 'R' { $][$ = 0; ]AT_VARIANT_IF([], [delete $][1]; )[YYERROR; }
|
| 'R' { $][$ = YY_NULL; ]AT_VARIANT_IF([], [delete $][1]; )[YYERROR; }
|
||||||
| 'p' { $][$ = $][1; }
|
| 'p' { $][$ = $][1; }
|
||||||
| 's' { $][$ = $][1; throw std::runtime_error ("reduction"); }
|
| 's' { $][$ = $][1; throw std::runtime_error ("reduction"); }
|
||||||
| 'T' { $][$ = 0; ]AT_VARIANT_IF([], [delete $][1]; )[YYABORT; }
|
| 'T' { $][$ = YY_NULL; ]AT_VARIANT_IF([], [delete $][1]; )[YYABORT; }
|
||||||
| error { $][$ = 0; yyerrok; }
|
| error { $][$ = YY_NULL; yyerrok; }
|
||||||
;
|
;
|
||||||
%%
|
%%
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user