On 9/24/14 4:26 PM, Tom Lane wrote: > Peter Eisentraut <pete...@gmx.net> writes: >> On 9/24/14 9:21 AM, Tom Lane wrote: >>> Agreed, but what about non-GCC compilers? > >> Stick AC_PROG_CC_C99 into configure.in. > > I think that's a bad idea, unless you mean to do it only on Solaris. > If we do that unconditionally, we will pretty much stop getting any > warnings about C99-isms on modern platforms. I am not aware that > there has been any agreement to move our portability goalposts up > to C99.
I don't disagree with that concern. But let's look at it this way. isinf() is a C99 function. If we want to have it, the canonical way is to put the compiler into C99 mode. Anything else is just pure luck (a.k.a. GNU extension). It's conceivable that on other platforms we fail to detect a system isinf() function because of that. The only way we learned about this is because the current configure check is inconsistent on Solaris. The first thing to fix is the configure check. It shouldn't detect a function if it creates a warning when used. What will happen then is probably that isinf() isn't detected on Solaris, and we use the fallback implementation. Are we happy with that? Maybe. If not, well, then we need to put the compiler into C99 mode. But then it's not a Solaris-specific problem anymore, because Solaris will then behave like any other platform in this regard. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers