Re: missing isinf declaration on solaris - Mailing list pgsql-hackers

From Oskari Saarenmaa
Subject Re: missing isinf declaration on solaris
Date
Msg-id 54241F25.7000407@ohmu.fi
Whole thread Raw
In response to Re: missing isinf declaration on solaris  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
24.09.2014, 23:26, Tom Lane kirjoitti:
> Peter Eisentraut <peter_e@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.

We don't currently try to select a C89 mode in configure.in, we just use 
the default mode which may be C89 or C99 or something in between.

GCC docs used to say that once C99 support is complete it'll switch 
defaults from gnu90 to gnu99, now the latest docs say that the default 
will change to gnu11 at some point 
(https://gcc.gnu.org/onlinedocs/gcc/Standards.html).  Solaris Studio 
already defaults to C99 and it looks like the latest versions of MSVC 
also support it.

I think we should just enable C99 mode when possible to use the 
backwards compatible features of it (like isinf).  If C89 support is 
still needed we should set up a new buildfarm animal that really uses a 
C89 mode compiler and makes sure it compiles without warnings.

/ Oskari



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Scaling shared buffer eviction
Next
From: Marko Tiikkaja
Date:
Subject: Re: pgcrypto: PGP armor headers