aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/bison
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-06-16 21:14:45 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-06-16 21:30:11 +0300
commitd49315affaf435f1e9852a3ce84101e28fe765bf (patch)
tree9dbb6ea2412f5d8fdf2cfd42feeb677bcba02af1 /contrib/tools/bison
parentbe56f24a02c348ff838c00269b9fb9ed8857a07c (diff)
downloadydb-d49315affaf435f1e9852a3ce84101e28fe765bf.tar.gz
Ignore warnings from bison, do not try to fix them
Some attempts to fix `-Wimplicit-fallthrough` are also visible. This warning was not enabled by default so there should be no need to ignore it. c285009965d42ab59060edad82d2af1715d686b8
Diffstat (limited to 'contrib/tools/bison')
-rw-r--r--contrib/tools/bison/data/lalr1.cc2
-rw-r--r--contrib/tools/bison/data/yacc.c10
-rw-r--r--contrib/tools/bison/src/scan-skel.c5
3 files changed, 5 insertions, 12 deletions
diff --git a/contrib/tools/bison/data/lalr1.cc b/contrib/tools/bison/data/lalr1.cc
index 7ff15234bd..f4f51c78c7 100644
--- a/contrib/tools/bison/data/lalr1.cc
+++ b/contrib/tools/bison/data/lalr1.cc
@@ -711,7 +711,7 @@ m4_if(b4_prefix, [yy], [],
int yylen = 0;
// Error handling.
- __attribute__((unused)) int yynerrs_ = 0;
+ int yynerrs_ = 0;
int yyerrstatus_ = 0;
/// The lookahead symbol.
diff --git a/contrib/tools/bison/data/yacc.c b/contrib/tools/bison/data/yacc.c
index 9fa369c8b2..822656b8d8 100644
--- a/contrib/tools/bison/data/yacc.c
+++ b/contrib/tools/bison/data/yacc.c
@@ -198,7 +198,7 @@ int yynerrs;]])])
# between calls to yypush_parse.
m4_define([b4_declare_parser_state_variables], [b4_pure_if([[
/* Number of syntax errors so far. */
- __attribute__((unused)) int yynerrs;
+ int yynerrs;
]])[
int yystate;
/* Number of tokens to shift before error messages enabled. */
@@ -770,7 +770,6 @@ int yydebug;
# define YYMAXDEPTH ]b4_stack_depth_max[
#endif]b4_lac_if([[
-
/* Given a state stack such that *YYBOTTOM is its bottom, such that
*YYTOP is either its top or is YYTOP_EMPTY to indicate an empty
stack, and such that *YYCAPACITY is the maximum number of elements it
@@ -1054,11 +1053,6 @@ yy_lac (yytype_int16 *yyesa, yytype_int16 **yyes,
backslash-backslash). YYSTR is taken from yytname. If YYRES is
null, do not copy; instead, return the length of what the result
would have been. */
-#ifdef __cplusplus
-# define BISON_FALLTHROUGH [[fallthrough]]
-#else
-# define BISON_FALLTHROUGH
-#endif
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
@@ -1077,7 +1071,7 @@ yytnamerr (char *yyres, const char *yystr)
case '\\':
if (*++yyp != '\\')
goto do_not_strip_quotes;
- BISON_FALLTHROUGH;
+ /* Fall through. */
default:
if (yyres)
yyres[yyn] = *yyp;
diff --git a/contrib/tools/bison/src/scan-skel.c b/contrib/tools/bison/src/scan-skel.c
index 1e116da14d..74f90d56db 100644
--- a/contrib/tools/bison/src/scan-skel.c
+++ b/contrib/tools/bison/src/scan-skel.c
@@ -42,11 +42,10 @@
#endif
/* %if-c++-only */
-#define BISON_FALLTHROUGH [[fallthrough]]
/* %endif */
/* %if-c-only */
-#define BISON_FALLTHROUGH
+
/* %endif */
/* %if-c-only */
@@ -1619,7 +1618,7 @@ static int yy_get_next_buffer (void)
/* Reset buffer status. */
skel_restart(skel_in );
- BISON_FALLTHROUGH;
+ /*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{