summaryrefslogtreecommitdiff
path: root/t/yacc-cxx.sh
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-05-16 16:26:39 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-05-16 16:32:20 +0200
commit0592e126d5f8e2de04894944c4cad9fe35198d30 (patch)
tree04d80ff64f5f8d863b7432524bd6bf4a19278376 /t/yacc-cxx.sh
parentf9006f81c15d6e7901e9c4d5fd78ab284f66355a (diff)
downloadautomake-0592e126d5f8e2de04894944c4cad9fe35198d30.tar.gz
yacc tests: avoid a spurious failure with Sun C++ 5.9
* t/yacc-cxx.sh (parse1.yy): When calling the 'getchar' function declared in the #included <cstdio>, fully qualify it as std::getchar', to avoid Sun C++ 5.9 erroring out with: "parse1.yy", line 5: Error: The function "getc" must have a prototype. * t/yacc-clean-cxx.sh (sub1/parsefoo.yxx): Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/yacc-cxx.sh')
-rwxr-xr-xt/yacc-cxx.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/yacc-cxx.sh b/t/yacc-cxx.sh
index dfcc12a40..41a25ec4a 100755
--- a/t/yacc-cxx.sh
+++ b/t/yacc-cxx.sh
@@ -46,7 +46,8 @@ cat > parse1.yy << 'END'
// Valid C++, but deliberately invalid C.
#include <cstdio>
#include <cstdlib>
-int yylex (void) { return getchar (); }
+// "std::" qualification required by Sun C++ 5.9.
+int yylex (void) { return std::getchar (); }
void yyerror (const char *s) { return; }
%}
%%