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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add "-Wimplicit-fallthrough" to default flags
Дата
Msg-id 31166.1589378554@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add "-Wimplicit-fallthrough" to default flags  (Andy Fan <zhihui.fan1213@gmail.com>)
Ответы Re: Add "-Wimplicit-fallthrough" to default flags  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Add "-Wimplicit-fallthrough" to default flags  (Andy Fan <zhihui.fan1213@gmail.com>)
Список pgsql-hackers
Andy Fan <zhihui.fan1213@gmail.com> writes:
>> FWIW, I got a warning for jsonpath_gram.c.

Ugh.  Confirmed here on Fedora 30 (bison 3.0.5).

> 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.

I fear that is going to mean that we revert this patch.
We are *NOT* moving the minimum bison requirement for this,
especially not to a bleeding-edge bison version.

Alternatively, it might work to go back down to warning level 3;
I see that the code in question has

    /* Fall through.  */

which I believe would work at the lower warning level.  But that
raises the question of how far back bison generates code that
is clean --- and, again, I'm not willing to move the minimum
bison requirement.  (On the other hand, if you have an old bison,
you likely also have an old gcc that doesn't know this warning
switch, so maybe it'd be all right in practice?)

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: COPY, lock release and MVCC
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PG compilation error with Visual Studio 2015/2017/2019