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

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Patch: Remove gcc dependency in definition of inline functions
Дата
Msg-id 1263756443.11833.27.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: Patch: Remove gcc dependency in definition of inline functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Patch: Remove gcc dependency in definition of inline functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Patch: Remove gcc dependency in definition of inline functions  (Kurt Harriman <harriman@acm.org>)
Список pgsql-hackers
On ons, 2009-12-16 at 10:49 -0500, Tom Lane wrote:
> I think you're way overthinking this.  Where we started was just
> a proposal to try to expand the set of inline-ing compilers beyond
> "gcc only".  I don't see why we need to do anything but that.  The
> code is fine as-is except for the control #ifdefs.

I have found an Autoconf macro that checks whether the compiler properly
supports C99 inline semantics.  This would allow us to replace the
__GNUC__ conditional with HAVE_C99_INLINE, in this case.  Interestingly,
however, this check results in GCC <=4.2 *not* supporting C99 inline,
apparently because it produces redundant copies of static inline
functions.  But GCC 4.2 is currently Debian stable, for example, so
de-supporting that is probably not yet an option.

So, I'm not sure if this would actually solve anyone's problem, but it
does call into question that exact semantics that we are looking for.
Maybe we just replace __GNUC__ by __GNUC__ || __SOMETHING_ELSE_CC__.

Patch attached for entertainment.

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Git out of sync vs. CVS
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Git out of sync vs. CVS