[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/6] c: stop defining YY_LOCATION_PRINT when locations are not en
From: |
Akim Demaille |
Subject: |
[PATCH 1/6] c: stop defining YY_LOCATION_PRINT when locations are not enabled |
Date: |
Tue, 9 Feb 2021 07:15:41 +0100 |
* data/skeletons/c.m4 (b4_yy_location_print_define): here.
---
data/skeletons/c.m4 | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/data/skeletons/c.m4 b/data/skeletons/c.m4
index a8e1a9d4a..96f53ee68 100644
--- a/data/skeletons/c.m4
+++ b/data/skeletons/c.m4
@@ -1076,7 +1076,7 @@ yy_location_print_ (FILE *yyo, YYLTYPE const * const
yylocp)
res += YYFPRINTF (yyo, "-%d", end_col);
}
return res;
- }
+}
# define YY_LOCATION_PRINT(File, Loc) \
yy_location_print_ (File, &(Loc))
@@ -1084,11 +1084,7 @@ yy_location_print_ (FILE *yyo, YYLTYPE const * const
yylocp)
# else
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
-# endif /* !defined YY_LOCATION_PRINT */]],
-[[/* This macro is provided for backward compatibility. */
-# ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif]])
+# endif /* !defined YY_LOCATION_PRINT */]])
])
# b4_yyloc_default
--
2.30.0
- [PATCH 0/6] c: make YYLOCATION_PRINT public, Akim Demaille, 2021/02/09
- [PATCH 1/6] c: stop defining YY_LOCATION_PRINT when locations are not enabled,
Akim Demaille <=
- [PATCH 2/6] examples: do not rely on YY_LOCATION_PRINT, Akim Demaille, 2021/02/09
- [PATCH 3/6] c: rename YY_LOCATION_PRINT as YYLOCATION_PRINT and make it public, Akim Demaille, 2021/02/09
- [PATCH 4/6] examples: use YYLOCATION_PRINT, Akim Demaille, 2021/02/09
- [PATCH 5/6] examples: improve some function prototypes, Akim Demaille, 2021/02/09
- [PATCH 6/6] doc: printing locations, Akim Demaille, 2021/02/09