Re: C99 compliance for src/port/snprintf.c
От | Tom Lane |
---|---|
Тема | Re: C99 compliance for src/port/snprintf.c |
Дата | |
Msg-id | 2069.1534363063@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: C99 compliance for src/port/snprintf.c (David Steele <david@pgmasters.net>) |
Ответы |
Re: C99 compliance for src/port/snprintf.c
|
Список | pgsql-hackers |
David Steele <david@pgmasters.net> writes: > On 8/15/18 3:18 PM, Tom Lane wrote: >> 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. > This works in C99 -- and I'm a really big fan. It does? [ checks standard... ] Oh wow: 6.8.5 Iteration statements Syntax iteration-statement: while ( expression ) statement do statement while ( expression ) ; for ( expr-opt ; expr-opt ; expr-opt ) statement for ( declaration ; expr-opt ; expr-opt ) statement I'd always thought this was only in C++. This alone might be a sufficient reason to drop C89 compiler support ... regards, tom lane
В списке pgsql-hackers по дате отправления: