[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/14] glr2.cc: check linking conflicts
From: |
Akim Demaille |
Subject: |
[PATCH 12/14] glr2.cc: check linking conflicts |
Date: |
Sun, 12 Sep 2021 14:07:45 +0200 |
* tests/headers.at (Several Headers): Link two glr2.cc parsers.
---
tests/headers.at | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/headers.at b/tests/headers.at
index ab2e636b..f107643a 100644
--- a/tests/headers.at
+++ b/tests/headers.at
@@ -242,6 +242,7 @@ m4_pushdef([AT_TEST],
| 'x' 'a' { printf ("xa\n"); }
| 'x' 'b' { printf ("xb\n"); }
| 'x' 'c' { printf ("xc\n"); }
+| 'x' 'd' { printf ("xd\n"); }
;
%%
@@ -281,6 +282,7 @@ m4_pushdef([AT_TEST],
#include "xa.hh"
#include "xb.hh"
#include "xc.hh"
+#include "xd.hh"
#define RUN(S) \
do { \
@@ -309,6 +311,8 @@ m4_pushdef([AT_TEST],
RUN(pb.parse());
xc_::parser pc;
RUN(pc.parse());
+ xd_::parser pd;
+ RUN(pd.parse());
return 0;
}
]])# main.cc
@@ -325,6 +329,7 @@ m4_pushdef([AT_TEST],
AT_TEST([xa], [%locations %code requires {#include "location.hh"} %define
api.location.type {::x5_::location} %language "c++" %define api.value.type
variant])
AT_TEST([xb], [%locations %define api.location.file none %language "c++"
%define api.value.type variant])
AT_TEST([xc], [%locations %code requires {#include "location.hh"} %define
api.location.type {::x5_::location} %skeleton "glr2.cc"])
+AT_TEST([xd], [%locations %define api.location.file none %skeleton "glr2.cc"])
# Check that api.prefix works properly:
#
@@ -381,7 +386,7 @@ m4_pushdef([AT_TEST],
# Do this late, so that other checks have been performed.
AT_SKIP_IF_CANNOT_LINK_C_AND_CXX
-AT_COMPILE_CXX([parser], [[x[1-9a-c].o -DCC_IS_CXX=$CC_IS_CXX main.cc]])
+AT_COMPILE_CXX([parser], [[x[1-9a-d].o -DCC_IS_CXX=$CC_IS_CXX main.cc]])
AT_PARSER_CHECK([parser], [0], [[expout]])
m4_popdef([AT_TEST])
--
2.32.0
- [PATCH 02/14] glr2.cc: put semantic_option into an unnamed namespace, (continued)
- [PATCH 02/14] glr2.cc: put semantic_option into an unnamed namespace, Akim Demaille, 2021/09/12
- [PATCH 03/14] glr2.cc: prefer unnamed namespace to 'static', Akim Demaille, 2021/09/12
- [PATCH 04/14] glr2.cc: put create_state_set_index in unnamed namespace, Akim Demaille, 2021/09/12
- [PATCH 05/14] glr2.cc: move glr_stack and glr_state into the parser class, Akim Demaille, 2021/09/12
- [PATCH 06/14] glr2.cc: style: clarify control flow, Akim Demaille, 2021/09/12
- [PATCH 07/14] glr2.cc: move state_stack into the unnamed namespace, Akim Demaille, 2021/09/12
- [PATCH 08/14] glr2.cc: put glr_state_set and glr_stack_item in unnamed namespace, Akim Demaille, 2021/09/12
- [PATCH 09/14] glr2.cc: prefer using, and remove useless type aliases, Akim Demaille, 2021/09/12
- [PATCH 10/14] glr2.cc: use only symbol_kind_type, not yysymbol_kind_t, Akim Demaille, 2021/09/12
- [PATCH 11/14] glr2.cc: move strong_index_alias into the unnamed namespace, Akim Demaille, 2021/09/12
- [PATCH 12/14] glr2.cc: check linking conflicts,
Akim Demaille <=
- [PATCH 13/14] glr2.cc: kill trailing white spaces, Akim Demaille, 2021/09/12
- [PATCH 14/14] glr2.cc: don't pass %parse-param to destroy, Akim Demaille, 2021/09/12
- Re: [PATCH 00/14] glr2.cc: fix linking conflicts, Tom Shields, 2021/09/12
- Re: [PATCH 00/14] glr2.cc: fix linking conflicts, Hans Åberg, 2021/09/13
- Re: [PATCH 00/14] glr2.cc: fix linking conflicts, Thomas Shields, 2021/09/13