Thread: Warnings compiling preproc.y
Compiling HEAD I see the following 2 warnings: ... make[4]: Leaving directory `/home/viy/prj/pgb/src/interfaces/ecpg/compatlib' make -C preproc all make[4]: Entering directory `/home/viy/prj/pgb/src/interfaces/ecpg/preproc' make -C ../../../../src/port all make[5]: Entering directory `/home/viy/prj/pgb/src/port' make[5]: Nothing to be done for `all'. make[5]: Leaving directory `/home/viy/prj/pgb/src/port' bison -y -d preproc.y mv -f y.tab.c ./preproc.c mv -f y.tab.h ./preproc.h /usr/bin/flex -o'pgc.c' pgc.l gcc -O2 -ggdb -DBITMAP_DEBUG -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing -g -Wno-error -I./../include -I. -I../../../../src/include -D_GNU_SOURCE -DMAJOR_VERSION=4 -DMINOR_VERSION=1 -DPATCHLEVEL=1 -c -o preproc.o preproc.c -MMD In file included from preproc.y:6416: pgc.c: In function `yylex': pgc.c:1503: warning: label `find_rule' defined but not used preproc.y: At top level: pgc.c:3559: warning: `yy_flex_realloc' defined but not used Should those variables be removed? -- Victor Y. Yegorov
Victor Yegorov wrote: > Compiling HEAD I see the following 2 warnings: > bison -y -d preproc.y > mv -f y.tab.c ./preproc.c > mv -f y.tab.h ./preproc.h > /usr/bin/flex -o'pgc.c' pgc.l > gcc -O2 -ggdb -DBITMAP_DEBUG -Wall -Wmissing-prototypes -Wpointer-arith > -Wendif-labels -fno-strict-aliasing -g -Wno-error -I./../include -I. > -I../../../../src/include -D_GNU_SOURCE -DMAJOR_VERSION=4 -DMINOR_VERSION=1 > -DPATCHLEVEL=1 -c -o preproc.o preproc.c -MMD > In file included from preproc.y:6416: > pgc.c: In function `yylex': > pgc.c:1503: warning: label `find_rule' defined but not used > preproc.y: At top level: > pgc.c:3559: warning: `yy_flex_realloc' defined but not used > > Should those variables be removed? These warnings aren't new; the fault lies in the C code generated by flex, so the problem is not simple to fix. -Neil