Re: do {} while (0) nitpick

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: do {} while (0) nitpick
Дата
Msg-id acc4b12e-09a2-c527-aacf-3caa8fcf47ab@2ndQuadrant.com
обсуждение исходный текст
Ответ на do {} while (0) nitpick  (John Naylor <john.naylor@2ndquadrant.com>)
Ответы Re: do {} while (0) nitpick  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 5/4/20 6:44 PM, Andrew Dunstan wrote:
> On 5/1/20 5:32 PM, Tom Lane wrote:
>> There are remaining instances of this antipattern in the flex-generated
>> scanners, which we can't do anything about; and in pl/plperl/ppport.h,
>> which we shouldn't do anything about because that's upstream-generated
>> code.  (I wonder though if there's a newer version available.)
>
> I'll take a look. It's more than 10 years since we updated it.
>
>


I tried this out with ppport.h from perl 5.30.2 which is what's on my
Fedora 31 workstation. It compiled fine, no warnings and the tests all
ran fine.


So we could update it. I'm just not sure there would be any great
benefit from doing so until we want to use some piece of perl API that
postdates 5.11.2, which is where our current file comes from.


I couldn't actually find an instance of the offending pattern in either
version of pport.h. What am I overlooking?


cheers


andrew


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




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

Предыдущее
От: Jeremy Schneider
Дата:
Сообщение: Re: SEQUENCE values (duplicated) in some corner cases when crashhappens
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Postgres Windows build system doesn't work with python installedin Program Files