Re: Patch: Remove gcc dependency in definition of inline functions

Поиск
Список
Период
Сортировка
От Kurt Harriman
Тема Re: Patch: Remove gcc dependency in definition of inline functions
Дата
Msg-id 4B276FC3.1010108@acm.org
обсуждение исходный текст
Ответ на Patch: Remove gcc dependency in definition of inline functions  (Kurt Harriman <harriman@acm.org>)
Ответы Re: Patch: Remove gcc dependency in definition of inline functions  (Marko Kreen <markokr@gmail.com>)
Re: Patch: Remove gcc dependency in definition of inline functions  (Kurt Harriman <harriman@acm.org>)
Список pgsql-hackers
Hi,

Attached is a revised patch, offered for the 2010-01 commitfest.
It's also available in my git repository in the "submitted" branch:
  http://git.postgresql.org/gitweb?p=users/harriman/share.git;a=shortlog;h=refs/heads/submitted

In this version, the "configure" script tests whether a static
inline function can be defined without incurring a warning when
not referenced.  If successful, the preprocessor symbol PG_INLINE
is defined in pg_config.h to the appropriate keyword: inline,
__inline, __inline__, or __forceinline.  Otherwise PG_INLINE
remains undefined.

palloc.h and pg_list.h condition their inline function
definitions on PG_INLINE instead of the gcc-specific __GNUC__.
Thus the functions can be inlined on more platforms, not only
gcc.

Ordinary out-of-line calls are still used if the compiler doesn't
recognize inline functions, or spews warnings when static inline
functions are defined but not referenced.

Regards,
... kurt




Вложения

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

Предыдущее
От: Boszormenyi Zoltan
Дата:
Сообщение: Re: ECPG patch 3, DESCRIBE [OUTPUT] support
Следующее
От: Hiroyuki Yamada
Дата:
Сообщение: An example of bugs for Hot Standby