Re: Patch: Remove gcc dependency in definition of inline functions - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Patch: Remove gcc dependency in definition of inline functions
Date
Msg-id 1263756443.11833.27.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: Patch: Remove gcc dependency in definition of inline functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses 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>)
List 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.

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Git out of sync vs. CVS
Next
From: Magnus Hagander
Date:
Subject: Re: Git out of sync vs. CVS