[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Use AT_DATA_GRAMMAR for C++ compile test for variants
From: |
Di-an JAN |
Subject: |
[PATCH] Use AT_DATA_GRAMMAR for C++ compile test for variants |
Date: |
Sun, 16 Nov 2008 16:42:47 -0800 (PST) |
This patch uses AT_DATA_GRAMMAR instead of AT_DATA for C++ compiled tests
as requested by the comments to AT_DATA_GRAMMAR_PROLOGUE in tests/local.at.
Fixes tests 198-202. The failure mode on Cygwin is:
The header <string> pulled in <string.h>, which, because of CPPFLAGS in
tests/atlocal.in, used the gnulib version in lib/string.h, but that,
on Cygwin, declared ``stpcpy'' using ``restrict'' unconditionally, which,
according to the lastest GCC manual, is not a C++ keyword. The configury
to handle that is in lib/config.h, which is not used by lib/string.h,
but is included when using AT_DATA_GRAMMAR.
Patch tested on Cygwin with ``make check'' with one expected failure.
By the way, I'm wondering we should do testing using gnulib headers in lib/
or should we test that Bison-generated programs can be compiled without
using gnulib. Patch ``no-config.patch'' attached for experimenting.
No problems on Cygwin.
2008-11-16 Di-an Jan <address@hidden>
* tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
diff --git a/tests/c++.at b/tests/c++.at
index 0cfcaf0..f1b1b3a 100644
--- a/tests/c++.at
+++ b/tests/c++.at
@@ -28,7 +28,7 @@ m4_define([AT_CHECK_VARIANTS],
[AT_SETUP([Variants $1])
# Store strings and integers in a list of strings.
-AT_DATA([list.yy],
+AT_DATA_GRAMMAR([list.yy],
[[%debug
%skeleton "lalr1.cc"
%defines
no-config.patch
Description: Text document
- [PATCH] Use AT_DATA_GRAMMAR for C++ compile test for variants,
Di-an JAN <=