C++ keywords in headers (was Re: [GENERAL] #include )

Поиск
Список
Период
Сортировка
От Tom Lane
Тема C++ keywords in headers (was Re: [GENERAL] #include )
Дата
Msg-id 17797.1293384697@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: C++ keywords in headers (was Re: [GENERAL] #include )  (Andrew Dunstan <andrew@dunslane.net>)
Re: C++ keywords in headers (was Re: [GENERAL] #include )  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Craig Ringer <craig@postnewspapers.com.au> writes:
> On 12/26/2010 02:14 PM, Elliot Chance wrote:
>> /usr/include/pgsql/server/nodes/primnodes.h:1155: error: expected unqualified-id before �using�

> You've neglected to mention which version of Pg you're compiling 
> against, so that line number means nothing. What's the offending line of 
> code and the surrounding few lines in primnodes.h?

I'm betting 8.4, because there is a field named "using" on that line in
8.4 ...

> In any case, I think it's very likely the issue is a C/C++ 
> incompatibility in the Pg headers. It fails for me in a different place 
> using Pg 9.1git and g++ 4.5, complaining about the use of "private" as 
> an identifier in fmgr.h, because it's a keyword in C++.

We did clean up C++ keyword uses in the header files in 9.0, but your
report shows it's already gotten broken again.  I'm disinclined to fix
it unless someone steps up to create an automated test that will get run
reasonably often.  We had that discussion when the patch to rename
keyword-named fields was proposed, and nothing got done, and the current
state of affairs is the entirely predictable result.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Add foreign data wrapper error code values for SQL/MED.
Следующее
От: Hitoshi Harada
Дата:
Сообщение: Re: knngist - 0.8