Re: Patch: Remove gcc dependency in definition of inline functions
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Marko Kreen <markokr@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Kurt Harriman <harriman@acm.org>, pgsql-hackers@postgresql.org
Date: 2010-01-17T23:22:27Z
Lists: pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes: > 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. Some of us are using much older gcc's than that, too ;-). But actually I think this test is 100% bogus anyhow. What it appears to rely on is the compiler failing to do semantic error testing on an inline function that it doesn't need to instantiate. That's a behavior that I'm pretty sure is gcc-specific rather than required by C99, and in any case has very little to do with our requirements. regards, tom lane