diff options
author | Akim Demaille <akim@lrde.epita.fr> | 2013-06-03 16:40:53 +0200 |
---|---|---|
committer | Akim Demaille <akim@lrde.epita.fr> | 2013-06-03 16:41:17 +0200 |
commit | 02798ba13d0a9174bf614bb0b1c48766bedc5fae (patch) | |
tree | 25b00a626de862a4e3c601f1ab386314341b01a1 | |
parent | 8e13c5c03b26aa518c7ccee997868aa8650e1613 (diff) | |
download | bison-02798ba13d0a9174bf614bb0b1c48766bedc5fae.tar.gz |
tests: fix a G++ warning
* tests/c++.at: Use YY_NULL instead of 0 for the null pointer.
And formatting changes.
-rw-r--r-- | tests/c++.at | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/c++.at b/tests/c++.at index d1d6975a..103a3f03 100644 --- a/tests/c++.at +++ b/tests/c++.at @@ -790,16 +790,16 @@ list: ; item: - 'a' { $$][ = $][1; } -| 'e' { YYUSE ($][$); YYUSE($][1); error ("syntax error"); } + 'a' { $$][ = $][1; } +| 'e' { YYUSE ($][$); YYUSE($][1); error ("syntax error"); } // Not just 'E', otherwise we reduce when 'E' is the lookahead, and // then the stack is emptied, defeating the point of the test. | 'E' 'a' { YYUSE($][1); $][$ = $][2; } -| 'R' { $][$ = 0; ]AT_VARIANT_IF([], [delete $][1]; )[YYERROR; } -| 'p' { $][$ = $][1; } -| 's' { $][$ = $][1; throw std::runtime_error ("reduction"); } -| 'T' { $][$ = 0; ]AT_VARIANT_IF([], [delete $][1]; )[YYABORT; } -| error { $][$ = 0; yyerrok; } +| 'R' { $][$ = YY_NULL; ]AT_VARIANT_IF([], [delete $][1]; )[YYERROR; } +| 'p' { $][$ = $][1; } +| 's' { $][$ = $][1; throw std::runtime_error ("reduction"); } +| 'T' { $][$ = YY_NULL; ]AT_VARIANT_IF([], [delete $][1]; )[YYABORT; } +| error { $][$ = YY_NULL; yyerrok; } ; %% |