Re: Add "-Wimplicit-fallthrough" to default flags

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Álvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add "-Wimplicit-fallthrough" to default flags
Date: 2020-05-13 11:35:18
Message-ID: CAOBaU_Y8ke1eFF3WzbNaNpncExfi78Ummf4P375JAwpg5_FUbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, May 13, 2020 at 12:16 PM Kyotaro Horiguchi
<horikyota(dot)ntt(at)gmail(dot)com> wrote:
>
> At Wed, 13 May 2020 16:17:50 +0800, Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> wrote in
> > On Wed, May 13, 2020 at 4:13 PM Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
> > wrote:
> > > > jsonpath_gram.c:1026:16: warning: this statement may fall through
> > > [-Wimplicit-fallthrough=]
> > > > if (*++yyp != '\\')
> > > > ^
> > > > jsonpath_gram.c:1029:11: note: here
> > > > default:
> ...
> > > It is generated code by bison.
> > >
> > > $ bison --version
> > > bison (GNU Bison) 3.0.4
> > >
> > >
> > I just found this just serval minutes ago. Upgrading your bison to the
> > latest
> > version (3.6) is ok. I'd like we have a better way to share this knowledge
> > through.
> > I spend ~30 minutes to troubleshooting this issue.
>
> Thanks. I'm happy to know that! But AFAICS 3.0.4 is the current
> version of bison in AppStream and PowerTools of CentOS8...

FTR I'm using bison 3.5 and I didn't hit any issue. However that may
be because of ccache, as mentioned by Alvaro.

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2020-05-13 13:20:16 pgsql: Initialize SLRU stats entries to zero.
Previous Message Kyotaro Horiguchi 2020-05-13 10:15:58 Re: Add "-Wimplicit-fallthrough" to default flags

Browse pgsql-hackers by date

  From Date Subject
Next Message Sumanta Mukherjee 2020-05-13 11:54:15 Re: refactoring basebackup.c
Previous Message Amit Kapila 2020-05-13 11:20:36 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions