Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-04 Thread Robert Haas
On Thu, Apr 3, 2014 at 11:28 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-04-02 23:50:19 +0200, Andres Freund wrote: I just tried it on clang. It builds clean with -Wc11-extensions except warning about _Static_assert(). That's possibly fixable with some autoconf trickery.

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-03 Thread Andres Freund
On 2014-04-02 23:50:19 +0200, Andres Freund wrote: I just tried it on clang. It builds clean with -Wc11-extensions except warning about _Static_assert(). That's possibly fixable with some autoconf trickery. Ah. That sounds promising. What clang version is that? It's debian's

[HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Tom Lane
Same issue as in http://www.postgresql.org/message-id/31718.1394059...@sss.pgh.pa.us In file included from jsonb.c:19: ../../../../src/include/utils/jsonb.h:195: warning: unnamed struct/union that defines no instances jsonb.c: In function `jsonb_in_object_field_start': jsonb.c:250: structure has

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Alvaro Herrera
Tom Lane wrote: Same issue as in http://www.postgresql.org/message-id/31718.1394059...@sss.pgh.pa.us In file included from jsonb.c:19: ../../../../src/include/utils/jsonb.h:195: warning: unnamed struct/union that defines no instances jsonb.c: In function `jsonb_in_object_field_start':

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Andres Freund
On 2014-04-02 13:56:40 -0400, Tom Lane wrote: We really need to get a buildfarm member going that complains about this. I had hoped to install a sufficiently old gcc version on prairiedog or dromedary, but didn't have much luck rebuilding ancient gcc releases on OS X. Some experimentation

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Andres Freund
On 2014-04-02 15:17:16 -0300, Alvaro Herrera wrote: Tom Lane wrote: Same issue as in http://www.postgresql.org/message-id/31718.1394059...@sss.pgh.pa.us In file included from jsonb.c:19: ../../../../src/include/utils/jsonb.h:195: warning: unnamed struct/union that defines no

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-04-02 15:17:16 -0300, Alvaro Herrera wrote: Tom Lane wrote: We really need to get a buildfarm member going that complains about this. Complain how? I find that gcc -std=c90 -pedantic emits these warnings about it: def.c:3:24: warning:

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Andres Freund
On 2014-04-02 14:36:28 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-04-02 15:17:16 -0300, Alvaro Herrera wrote: Tom Lane wrote: We really need to get a buildfarm member going that complains about this. Complain how? I find that gcc -std=c90 -pedantic

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-04-02 13:56:40 -0400, Tom Lane wrote: We really need to get a buildfarm member going that complains about this. I had hoped to install a sufficiently old gcc version on prairiedog or dromedary, but didn't have much luck rebuilding ancient

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-04-02 14:36:28 -0400, Tom Lane wrote: Well, in any case, people very seldom check to see if any buildfarm members are producing compiler warnings. You need the build to actually go red to get anyone's attention reliably. Yea, we'd need to

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Andres Freund
On 2014-04-02 14:42:39 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-04-02 13:56:40 -0400, Tom Lane wrote: We really need to get a buildfarm member going that complains about this. I had hoped to install a sufficiently old gcc version on prairiedog or

Re: [HACKERS] jsonb is also breaking the rule against nameless unions

2014-04-02 Thread Andres Freund
On 2014-04-02 15:03:47 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-04-02 14:36:28 -0400, Tom Lane wrote: Well, in any case, people very seldom check to see if any buildfarm members are producing compiler warnings. You need the build to actually go red to