Re: Use -fvisibility=hidden for shared libraries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Use -fvisibility=hidden for shared libraries
Дата
Msg-id 2767066.1641934459@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Use -fvisibility=hidden for shared libraries  (Andres Freund <andres@anarazel.de>)
Ответы Re: Use -fvisibility=hidden for shared libraries  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> What is bugging me is that I am fairly sure that my local compilers at some
> point complained about such mismatches on linux as well. But I can't reproduce
> that right now :/

> Now I wonder if I just saw it when cross compiling locally...

I still don't understand what are the conditions for MSVC to complain.
The rule is evidently not that every extern must agree with the function
definition, because for example you added

+extern PGDLLEXPORT void _PG_init(void);

in fmgr.h, but you didn't change any of the existing extern declarations
or definitions for _PG_init functions, and yet everything seems to work.

I had concluded that gcc/clang follow the rule "use an attribute if it
appears on at least one extern for the function", and this seems like
evidence that it works like that in MSVC too.

            regards, tom lane



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

Предыдущее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: Add jsonlog log_destination for JSON server logs
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: Column Filtering in Logical Replication