24.09.2014, 16:21, Tom Lane kirjoitti:
Oskari Saarenmaa <o...@ohmu.fi> writes:
... so to enable XPG6 we'd need to use C99 mode anyway.

OK.

Could we just use
-std=gnu99 (with -fgnu89-inline if required) with GCC on Solaris?  ISTM
it would be cleaner to just properly enable c99 mode rather than define
an undocumented macro to use a couple of c99 declarations.

Agreed, but what about non-GCC compilers?

Solaris Studio defaults to "-xc99=all,no_lib" which, according to the man page, enables c99 language features but doesn't use c99 standard library semantics. isinf is defined to be a macro by c99 and doesn't require changing the c99 mode so I'd just keep using the defaults with Solaris Studio for now.

For GCC

--- a/src/template/solaris
+++ b/src/template/solaris
@@ -0,0 +1,4 @@
+if test "$GCC" = yes ; then
+  CPPFLAGS="$CPPFLAGS -std=gnu99"
+fi
+

gets rid of the warnings and passes tests.

/ Oskari


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to