Re: additional GCC warning flags
От | Bruce Momjian |
---|---|
Тема | Re: additional GCC warning flags |
Дата | |
Msg-id | 200410181721.i9IHL4918398@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: additional GCC warning flags (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-patches |
Agreed, I see no harm in adding it now. --------------------------------------------------------------------------- Tom Lane wrote: > Neil Conway <neilc@samurai.com> writes: > > This patch updates configure.in and configure (I re-ran autoconf 2.53). > > It doesn't introduce any additional warning messages locally (Linux, GCC > > 3.4), but might do so on some platforms (the code in src/port/ is likely > > to trigger some warnings, I think). Because of that, I think it is > > probably best to save this for 8.1 > > As long as it can only introduce warnings and not errors, I think it is > fine to apply now. It might help us flush out some portability issues > --- we are just coming up on the stage of officially calling for port > reports for 8.0, so it seems like now is a good time to put it in. > > One thing I'd suggest is that the "if test "$GCC" = yes; then" > conditional go outside the PGAC macros, ie > > if test "$GCC" = yes; then > PGAC_PROG_CC_WARN_DECL_AFTER_STMT > PGAC_PROG_CC_WARN_OLD_STYLE_DEFN > PGAC_PROG_CC_WARN_ENDIF_LABELS > fi > > as otherwise people with non-gcc compilers will think configure is > pretty stupid even to be making the tests. > > Also, how about removing the conditional CFLAGS hacking from > Makefile.global.in entirely, and change the above to > > if test "$GCC" = yes; then > CFLAGS="$CFLAGS -Wall -Wmissing-prototypes" > PGAC_PROG_CC_WARN_DECL_AFTER_STMT > PGAC_PROG_CC_WARN_OLD_STYLE_DEFN > PGAC_PROG_CC_WARN_ENDIF_LABELS > fi > > which localizes the logic a tad more, and keeps the CFLAGS entries in a > rational-looking order. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
В списке pgsql-patches по дате отправления: