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 emits these warnings > >> about > >> it: > >> def.c:3:24: warning: ISO C90 doesn’t support unnamed structs/unions > >> [-pedantic] > >> def.c:1:8: warning: struct has no named members [-pedantic] > > > Last time I checked gcc builds of postgres using -pedantic are so > > verbose that warnings don't have an effect anymore. Is that not the case > > anymore? > > 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 be able to turn on -Werror if it's going to have any effect. I don't think our configure currently copes with that unfortunately... 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. > The non-C89 feature that I've been really worried about is flexible > array members (which we intend to start using more heavily, so we need > a complaint if someone leaves out the FLEXIBLE_ARRAY_MEMBER macro). > Based on the last month or so I guess that anonymous unions are a big > issue as well. I'd like to have a buildfarm member whose compiler > doesn't recognize either of those ... and AFAICT, -pedantic is no > help for the array case. gcc's -pedantic warns about flexible array members here, but it doesn't solve the problem with it being unusable :( Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers