From fdba54a961a01595f5461d38af6ff6426c74e165 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 31 Jan 2021 21:01:16 +0100 Subject: [PATCH] c: stop defining YY_LOCATION_PRINT when locations are not enabled * 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 a8e1a9d4..96f53ee6 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