]> git.saurik.com Git - bison.git/commitdiff
tests: fix a G++ warning
authorAkim Demaille <akim@lrde.epita.fr>
Mon, 3 Jun 2013 14:40:53 +0000 (16:40 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Mon, 3 Jun 2013 14:41:17 +0000 (16:41 +0200)
* tests/c++.at: Use YY_NULL instead of 0 for the null pointer.
And formatting changes.

tests/c++.at

index d1d6975a0858df9512b28bf5716d6e94aaaf8f6f..103a3f03a5e61492fc3eabec1cba40a9e78cd177 100644 (file)
@@ -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; }
 ;
 %%