Re: scan.c:900: warning: ... postgresql-7.1

Поиск
Список
Период
Сортировка
От Limin Liu
Тема Re: scan.c:900: warning: ... postgresql-7.1
Дата
Msg-id 3ADCBDB8.F1F33F43@pumpkinnet.com
обсуждение исходный текст
Ответ на scan.c:900: warning: ... postgresql-7.1  (Limin Liu <limin@pumpkinnet.com>)
Ответы Re: scan.c:900: warning: ... postgresql-7.1  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
> No, but it doesn't need to.  Both variables are assigned before first
> use, as even an extremely stupid compiler should be able to figure out.

:-) I agree.

>
> What compiler version are you using, and with what command-line switches?
>

Here is what I have
% gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

I believe this compiler is not that old.

After I un-tar the .gz, I run ./configure with prefix then gmake.  That's
it.

I first see warning in lex.Int_yy.c, than scan.c.    Here are those message,
hope this can help.
======================
gmake[3]: Entering directory `/tmp/tmp/postgresql-7.1/src/backend/bootstrap'

gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-error
-I../../../src/include   -c
-o bootparse.o bootparse.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-error
-I../../../src/include   -c
-o bootscanner.o bootscanner.c
lex.Int_yy.c: In function `Int_yylex':
lex.Int_yy.c:689: warning: `Int_yy_cp' might be used uninitialized in this
function
lex.Int_yy.c:689: warning: `Int_yy_bp' might be used uninitialized in this
function
     :
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-error
-I../../../src/include   -c
-o scan.o scan.c
scan.c: In function `base_yylex':
scan.c:900: warning: `yy_cp' might be used uninitialized in this function
scan.c:900: warning: `yy_bp' might be used uninitialized in this function
     :
pgc.c: In function `yylex':
pgc.c:1243: warning: label `find_rule' defined but not used
pgc.c:1178: warning: `yy_cp' might be used uninitialized in this function
pgc.c:1178: warning: `yy_bp' might be used uninitialized in this function
pgc.c: At top level:
pgc.c:3091: warning: `yy_flex_realloc' defined but not used
======================
configure does find flex and bison...
   :
checking for flex... /usr/bin/flex
checking whether ln -s works... yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for ranlib... ranlib
checking for lorder... no
checking for tar... /bin/tar
checking for perl... perl
checking for bison... bison -y
  :

Everything looks fine to me and the previous copy (7.1 beta4) doesn't give
me any warning message.  That's why I am curious what's going on...

Thanks for your help

--
LM Liu



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

Предыдущее
От: Christopher Masto
Дата:
Сообщение: Inheritance and rules/triggers
Следующее
От: "K Old"
Дата:
Сообщение: Insert data into multiple tables