Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.
Дата
Msg-id 6871.1297955377@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On Thu, 2011-02-17 at 00:53 +0000, Tom Lane wrote:
>> Doesn't anybody around here pay attention to compiler warnings?

> If you see one, then I accept one was there. I didn't see one, and a
> full make distclean and re-compile doesn't show a compiler warning for
> that either. So I guess I'm doing something wrong, on this platform:

> I'm using Ubuntu 10.04 LTS, with commands for development:
> ./configure --enable-cassert --enable-depend --enable-debug
> make -j4

Hmm ... the only plausible reason I can think of for gcc not showing
that warning would be building with -O0 (which disables the flow graph
computations needed to detect uses of uninitialized values).  Your
configure command doesn't betray any such thing, but maybe you've got
some CFLAGS overrides you're not showing us?

I usually find that -O1 is the best compromise setting for development
builds.  It enables uninitialized-variable warnings but doesn't produce
code that's completely unfriendly to gdb.  (Sometimes I do recompile a
specific file at -O0 if it's making no sense during single-stepping.)

> The compile output has been somewhat dirty of late, with various
> messages, which if nothing else indicated to me that fairly strict
> warnings were enabled... though I guess not.

In my builds, the only warning anywhere is the unused variable in
gram.y, which is a bison bug that we can't do anything about (except
complain to the bison folk, which I've done).  It might be worth trying
to clean up those warn_unused_result things, if other people are seeing
those.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: btree_gist (was: CommitFest progress - or lack thereof)