Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql:Support FETCH FIRST WITH TIES)

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql:Support FETCH FIRST WITH TIES)
Дата
Msg-id 20200506233903.GA24861@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql: Support FETCH FIRST WITH TIES)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Add "-Wimplicit-fallthrough" to default flags (was Re: pgsql:Support FETCH FIRST WITH TIES)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On 2020-Apr-12, Tom Lane wrote:

> The only more-restrictive alternative, short of disabling
> the comments altogether, is
> 
>            * -Wimplicit-fallthrough=4 case sensitively matches one of the
>                following regular expressions:
> 
>                *<"-fallthrough">
>                *<"@fallthrough@">
>                *<"lint -fallthrough[ \t]*">
>                *<"[ \t]*FALLTHR(OUGH|U)[ \t]*">
> 
> Thoughts?

This doesn't allow whitespace between "fall" and "through", which means
we generate 217 such warnings currently.  Or we can just use
-Wimplicit-fallthrough=3, which does allow whitespace (among other
detritus).

For my own reference, the manual is at
https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/Warning-Options.html#index-Wimplicit-fallthrough

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: PG 13 release notes, first draft
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: PG 13 release notes, first draft