Re: Do not use C++ style comments (// comments). Strict ANSI Ccompilers do not accept them.

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Do not use C++ style comments (// comments). Strict ANSI Ccompilers do not accept them.
Дата
Msg-id d0ecd3a3-3e90-1817-5921-19dc98d040a6@2ndquadrant.com
обсуждение исходный текст
Ответ на Do not use C++ style comments (// comments). Strict ANSI C compilers do not accept them.  (PG Doc comments form <noreply@postgresql.org>)
Ответы Re: Do not use C++ style comments (// comments). Strict ANSI C compilers do not accept them.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-docs
On 2019-09-23 16:39, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/11/source-format.html
> Description:
> 
> This sentence in the style guide feels outdated. // style comments have been
> in the ANSI C standard for almost 20 years now (C99 was accepted as ANSI
> standard in may 2000). I suggest rewording this to "Do not use C99 style
> comments (// comments). Strict C89 compilers do not accept them." or come up
> with some other reason for /**/ style being preferred to // style since I'm
> not entierly convinced postgres compiles on C89 anyways.

PostgreSQL 12 requires C99, so those guidelines should probably be
rephrased from "because old compilers don't accept it" to "because we
like it that way".

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: I'm surprised to see the word master here
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Do not use C++ style comments (// comments). Strict ANSI C compilers do not accept them.