summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-02-16 11:03:31 +0100
committerJim Meyering <meyering@redhat.com>2012-02-16 11:03:31 +0100
commit292402a9b2a9fe3440008e42a41b01185d9a4f9d (patch)
tree9261f96a8305d49883de4c7e53932405eac23e06
parent3d6ca339083c278d907c9f030f4ba6bc5ecb07f2 (diff)
downloadbison-292402a9b2a9fe3440008e42a41b01185d9a4f9d.tar.gz
tests: avoid c++ failure due to lack of getenv decl
* tests/c++.at (Syntax error as exception): Avoid spurious failure at least when compiling with g++-4.7.x due to lack of declaration of getenv. Include <stdlib.h>.
-rw-r--r--tests/c++.at3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/c++.at b/tests/c++.at
index d29b6f60..3510498b 100644
--- a/tests/c++.at
+++ b/tests/c++.at
@@ -461,6 +461,7 @@ AT_DATA_GRAMMAR([[input.yy]],
%code
{
+ #include <stdlib.h>
int yylex (yy::parser::semantic_type *);
}
@@ -510,7 +511,7 @@ yy::parser::error (const std::string &m)
}
int
-main ()
+main (void)
{
yy::parser parser;
parser.set_debug_level(!!getenv("YYDEBUG"));