bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tests: add missing includes


From: Akim Demaille
Subject: tests: add missing includes
Date: Thu, 10 Oct 2019 17:45:36 +0200

A forthcoming change revealed missing includes in the test suite.

commit 566b433c91b5326c6f3b9e7c9b474a7752926b4f
Author: Akim Demaille <address@hidden>
Date:   Thu Oct 10 07:00:11 2019 +0200

    tests: add missing includes
    
    * tests/actions.at, tests/headers.at, tests/regression.at: here.

diff --git a/tests/actions.at b/tests/actions.at
index 84dab3c0..ea12d0e7 100644
--- a/tests/actions.at
+++ b/tests/actions.at
@@ -425,6 +425,7 @@ AT_DATA_GRAMMAR([[input.y]],
 ]$3[
 %code
 {
+#include <stdio.h> /* putchar. */
 ]AT_YYERROR_DECLARE[
 ]AT_YYLEX_DECLARE[
 }
@@ -1728,6 +1729,7 @@ AT_DATA_GRAMMAR([[input.y]],
 # define YYSTYPE sem_type
 
 ]AT_CXX_IF([[
+# include <cstdio> // EOF.
 # include <iostream>
   namespace
   {
diff --git a/tests/headers.at b/tests/headers.at
index 8b19d3fe..fa3556ac 100644
--- a/tests/headers.at
+++ b/tests/headers.at
@@ -127,6 +127,7 @@ AT_DATA_GRAMMAR([input.y],
 %define parse.error verbose
 ]AT_VARIANT_IF([%token <int> 'x'], [%union {int integer;}])[
 %code {
+#include <stdio.h> /* printf. */
 ]AT_PUSH_IF([[
 #if defined __GNUC__ && 7 == __GNUC__
 # pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
@@ -212,6 +213,7 @@ $2
   int integer;
 }
 %{
+#include <stdio.h> /* printf. */
 ]AT_PUSH_IF([[
 #if defined __GNUC__ && 7 == __GNUC__
 # pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
diff --git a/tests/regression.at b/tests/regression.at
index 1f308e90..9bfaf67b 100644
--- a/tests/regression.at
+++ b/tests/regression.at
@@ -1309,6 +1309,7 @@ AT_BISON_OPTION_PUSHDEFS([%debug $1])
 
 AT_DATA_GRAMMAR([input.y],
 [[%code {
+#include <stdio.h> /* printf */
   ]AT_YYERROR_DECLARE[
   ]AT_YYLEX_DECLARE[
 }
@@ -1480,12 +1481,13 @@ AT_DATA_GRAMMAR([input.y],
 }
 
 %{
+#include <stdio.h> /* printf. */
   ]AT_YYERROR_DECLARE[
   ]AT_YYLEX_DECLARE[
 %}
 
 %%
-exp: 'a' { fprintf (stdout, "x: %d, y: %d\n", x, y); };
+exp: 'a' { printf ("x: %d, y: %d\n", x, y); };
 %%
 ]AT_YYERROR_DEFINE[
 ]AT_YYLEX_DEFINE(["a"])[




reply via email to

[Prev in Thread] Current Thread [Next in Thread]