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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: C99 compliance for src/port/snprintf.c
Дата
Msg-id 9877.1534371239@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: C99 compliance for src/port/snprintf.c  (Andres Freund <andres@anarazel.de>)
Ответы Re: C99 compliance for src/port/snprintf.c
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2018-08-15 15:57:43 -0400, Tom Lane wrote:
>> I'd always thought this was only in C++.  This alone might be a sufficient
>> reason to drop C89 compiler support ...

> It's also IIRC reasonably widely supported from before C99. So, for the
> sake of designated initializers, for loop scoping, snprintf, let's do
> this in master?

Nitpick: snprintf is an independent concern: that's from the C library,
not from the compiler.  To drive the point home, I could still test
master on "gaur" if I were to install a just-slightly-newer gcc on that
machine (its existing gcc installation isn't native either...); but
replacing its libc is a nonstarter.

Experimenting here says that even reasonably modern gcc's won't take
declarations-inside-for without "--std=c99" or such.  No idea about
other compilers.  So we'd have a little bit of work to do on
configuration before we could open the floodgates on this.

            regards, tom lane


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

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