e# Executing Actions. -*- Autotest -*-
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
%code
{
# include <stdio.h>
-# include <stdlib.h> // getenv
+# include <stdlib.h> /* getenv */
]AT_YYERROR_DECLARE[
]AT_YYLEX_DECLARE[
}
%code
{
# include <stdio.h>
-# include <stdlib.h> // getenv
+# include <stdlib.h> /* getenv */
]AT_YYERROR_DECLARE[
]AT_YYLEX_DECLARE[
}
TEST(7, 2, 0, 2);
TEST(8, 0, 8, 0);
+ return 0;
}
]])
[[input.y:24.70-72: warning: useless %destructor for type <*> [-Wother]
input.y:24.70-72: warning: useless %printer for type <*> [-Wother]
input.y:33.3-23: warning: unset value: $$ [-Wother]
-input.y:30.3-35.37: warning: unused value: $3 [-Wother]
+input.y:32.3-23: warning: unused value: $3 [-Wother]
+]])
+
+AT_BISON_CHECK([-fcaret -o input.c input.y], 0,,
+[[input.y:24.70-72: warning: useless %destructor for type <*> [-Wother]
+ %printer { fprintf (yyoutput, "<*> printer should not be called"); } <*>
+ ^^^
+input.y:24.70-72: warning: useless %printer for type <*> [-Wother]
+ %printer { fprintf (yyoutput, "<*> printer should not be called"); } <*>
+ ^^^
+input.y:33.3-23: warning: unset value: $$ [-Wother]
+ { @$ = 4; } // Only used.
+ ^^^^^^^^^^^^^^^^^^^^^
+input.y:32.3-23: warning: unused value: $3 [-Wother]
+ { USE ($$); @$ = 3; } // Only set.
+ ^^^^^^^^^^^^^^^^^^^^^
]])
AT_COMPILE([input])
AT_BISON_CHECK([[-o input.c input.y]], [0], [],
[[input.y:8.48: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:8.48: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:8.48: future versions of Bison will not add the ';'
input.y:9.48: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:9.48: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:9.48: future versions of Bison will not add the ';'
input.y:10.48: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:10.48: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:10.48: future versions of Bison will not add the ';'
input.y:11.48: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:11.48: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:11.48: future versions of Bison will not add the ';'
input.y:12.48: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:12.48: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:12.48: future versions of Bison will not add the ';'
input.y:13.48: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:13.48: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:13.48: future versions of Bison will not add the ';'
input.y:20.1: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:20.1: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:20.1: future versions of Bison will not add the ';'
input.y:21.1: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:21.1: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:21.1: future versions of Bison will not add the ';'
input.y:22.1: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:22.1: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:22.1: future versions of Bison will not add the ';'
input.y:23.1: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:23.1: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:23.1: future versions of Bison will not add the ';'
input.y:24.1: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:24.1: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:24.1: future versions of Bison will not add the ';'
input.y:25.1: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:25.1: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:25.1: future versions of Bison will not add the ';'
input.y:31.1: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:31.1: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:31.1: future versions of Bison will not add the ';'
input.y:32.1: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:32.1: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:32.1: future versions of Bison will not add the ';'
input.y:33.1: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:33.1: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:33.1: future versions of Bison will not add the ';'
input.y:34.1: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:34.1: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:34.1: future versions of Bison will not add the ';'
input.y:35.1: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:35.1: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:35.1: future versions of Bison will not add the ';'
input.y:36.1: warning: a ';' might be needed at the end of action code [-Wdeprecated]
-input.y:36.1: warning: future versions of Bison will not add the ';' [-Wdeprecated]
+input.y:36.1: future versions of Bison will not add the ';'
]])
AT_MATCHES_CHECK([input.c], [[/\* TEST:N:2 \*/ \}$]], [[3]])