The lastest clang svn tip (2.9-to-be, I guess) builds PostgreSQL out of
the box and most tests pass.  Specifically, it no longer chokes on
-D_GNU_SOURCE on Linux, which was the previously reported blocker.

Warnings:

Lots of these:
clang: warning: argument unused during compilation: '-mthreads'
clang: warning: argument unused during compilation: '-mt'

Possible fix, check both link and compile invocations for warnings in
configure:

diff --git i/config/acx_pthread.m4 w/config/acx_pthread.m4
index ceb161a..ee181f9 100644
--- i/config/acx_pthread.m4
+++ w/config/acx_pthread.m4
@@ -142,7 +142,7 @@ main (int argc, char **argv)
 }
 _ACEOF
             rm -f conftest.$ac_objext conftest$ac_exeext
-            if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
+            if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval 
$ac_compile 2>&1 1>&5)`" = ""; then
                 # we continue with more flags because Linux needs -lpthread
                 # for libpq builds on PostgreSQL.  The test above only
                 # tests for building binaries, not shared libraries.


The usual flex warning:

In file included from gram.y:12460:
scan.c:16256:23: warning: unused variable 'yyg' [-Wunused-variable]
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be 
unused depending upon options. */


And then only these two:

fe-exec.c:2408:13: warning: comparison of unsigned enum expression < 0 is 
always false [-Wtautological-compare]
        if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0])
            ~~~~~~ ^ ~

pg_standby.c:347:22: warning: comparison of unsigned expression >= 0 is always 
true [-Wtautological-compare]
                if (tli > 0 && log >= 0 && seg > 0)
                               ~~~ ^  ~


Regression tests (world):

--- src/test/regress/expected/float8.out
+++ src/test/regress/results/float8.out
@@ -384,7 +384,15 @@
 SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
 ERROR:  value out of range: overflow
 SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
-ERROR:  value out of range: overflow
+ bad | ?column? 
+-----+----------
+     |        0
+     |      NaN
+     |      NaN
+     |      NaN
+     |      NaN
+(5 rows)
+
 SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5;
  ?column? 
 ----------

PL/Python test crashes.  I was able to make it work either by using -O0
or by applying the following patch: 

diff --git i/src/pl/plpython/plpython.c w/src/pl/plpython/plpython.c
index fff7de7..8eaee36 100644
--- i/src/pl/plpython/plpython.c
+++ w/src/pl/plpython/plpython.c
@@ -1019,12 +1019,13 @@ PLy_trigger_build_args(FunctionCallInfo fcinfo, 
PLyProcedure *proc, HeapTuple *r
 
 /* function handler and friends */
 static Datum
-PLy_function_handler(FunctionCallInfo fcinfo, PLyProcedure *proc)
+PLy_function_handler(FunctionCallInfo fcinfo, PLyProcedure *proc2)
 {
    Datum       rv;
    PyObject   *volatile plargs = NULL;
    PyObject   *volatile plrv = NULL;
    ErrorContextCallback plerrcontext;
+   PLyProcedure *volatile proc = proc2;
 
    PG_TRY();
    {

Hmmm.


-- 
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