Re: C99 compliance for src/port/snprintf.c

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: C99 compliance for src/port/snprintf.c
Дата
Msg-id 5c0b98fc-a565-f418-74d8-ef1d42fa449f@2ndQuadrant.com
обсуждение исходный текст
Ответ на Re: C99 compliance for src/port/snprintf.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On 08/15/2018 03:18 PM, Tom Lane wrote:
>
> FWIW, the issue I've got with what C99 did is that you can narrow the
> *start* of the scope of a local variable easily, but not the *end* of
> its scope, which seems to me to be solving at most half of the problem.
> To solve the whole problem, you end up needing a nested block anyway.
>
> I do dearly miss the ability to easily limit the scope of a loop's
> control variable to just the loop, eg
>
>     for (int i = 0; ...) { ... }
>
> But AFAIK that's C++ not C99.
>
>             



Agree completely.

cheers

andrew

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



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: C99 compliance for src/port/snprintf.c
Следующее
От: David Steele
Дата:
Сообщение: Re: C99 compliance for src/port/snprintf.c