Hi friends, I can't compile Bison with GCC 4.3 and 4.4 (newer ones seem to be happy, I have not tried to understand why).
The attached patch fixes the issue. There are also many warnings (see below for GCC 4.4), but I don't know if you care. Cheers! Akim gmake[3]: Entering directory `/Users/akim/src/gnu/bison-2.5/_build/44-debug/lib' CC main.o CC yyerror.o AR liby.a CC argmatch.o CC binary-io.o In file included from ../../../lib/binary-io.c:4: ../../../lib/binary-io.h:50: warning: no previous prototype for 'set_binary_mode' CC bitrotate.o In file included from ../../../lib/bitrotate.c:4: ../../../lib/bitrotate.h:36: warning: no previous prototype for 'rotl64' ../../../lib/bitrotate.h:45: warning: no previous prototype for 'rotr64' ../../../lib/bitrotate.h:55: warning: no previous prototype for 'rotl32' ../../../lib/bitrotate.h:64: warning: no previous prototype for 'rotr32' ../../../lib/bitrotate.h:73: warning: no previous prototype for 'rotl_sz' In file included from ../../../lib/bitrotate.c:4: ../../../lib/bitrotate.h:82: warning: no previous prototype for 'rotr_sz' ../../../lib/bitrotate.h:93: warning: no previous prototype for 'rotl16' ../../../lib/bitrotate.h:104: warning: no previous prototype for 'rotr16' ../../../lib/bitrotate.h:115: warning: no previous prototype for 'rotl8' ../../../lib/bitrotate.h:126: warning: no previous prototype for 'rotr8' CC c-ctype.o CC c-strcasecmp.o CC c-strncasecmp.o CC cloexec.o CC close-stream.o CC closeout.o CC dirname.o CC basename.o CC dirname-lgpl.o CC basename-lgpl.o ../../../lib/basename-lgpl.c: In function 'last_component': ../../../lib/basename-lgpl.c:50: warning: cast discards qualifiers from pointer target type CC stripslash.o CC exitfail.o CC fatal-signal.o In file included from ../../../lib/fatal-signal.c:30: ../../../lib/sig-handler.h:35: warning: no previous prototype for 'get_handler' CC fd-hook.o CC fd-safer-flag.o CC dup-safer-flag.o CC fopen-safer.o CC hash.o In file included from ../../../lib/hash.c:30: ../../../lib/bitrotate.h:36: warning: no previous prototype for 'rotl64' ../../../lib/bitrotate.h:45: warning: no previous prototype for 'rotr64' ../../../lib/bitrotate.h:55: warning: no previous prototype for 'rotl32' ../../../lib/bitrotate.h:64: warning: no previous prototype for 'rotr32' ../../../lib/bitrotate.h:73: warning: no previous prototype for 'rotl_sz' In file included from ../../../lib/hash.c:30: ../../../lib/bitrotate.h:82: warning: no previous prototype for 'rotr_sz' ../../../lib/bitrotate.h:93: warning: no previous prototype for 'rotl16' ../../../lib/bitrotate.h:104: warning: no previous prototype for 'rotr16' ../../../lib/bitrotate.h:115: warning: no previous prototype for 'rotl8' ../../../lib/bitrotate.h:126: warning: no previous prototype for 'rotr8' ../../../lib/hash.c: In function 'hash_insert_if_absent': ../../../lib/hash.c:1103: warning: cast discards qualifiers from pointer target type ../../../lib/hash.c:1112: warning: cast discards qualifiers from pointer target type ../../../lib/hash.c: In function 'hash_insert': ../../../lib/hash.c:1140: warning: cast discards qualifiers from pointer target type CC localcharset.o CC lock.o CC math.o CC mbchar.o In file included from ../../../lib/mbchar.c:24: ../../../lib/mbchar.h:244: warning: no previous prototype for 'mb_width_aux' In file included from ../../../lib/mbchar.c:24: ../../../lib/mbchar.h:265: warning: no previous prototype for 'mb_copy' In file included from ../../../lib/mbchar.c:24: ../../../lib/mbchar.h:313: warning: no previous prototype for 'is_basic' CC mbschr.o In file included from ../../../lib/mbuiter.h:107, from ../../../lib/mbschr.c:24: ../../../lib/mbchar.h:244: warning: no previous prototype for 'mb_width_aux' ../../../lib/mbchar.h: In function 'mb_width_aux': ../../../lib/mbchar.h:249: warning: 'iswcntrl' is static but used in inline function 'mb_width_aux' which is not static In file included from ../../../lib/mbuiter.h:107, from ../../../lib/mbschr.c:24: ../../../lib/mbchar.h: At top level: ../../../lib/mbchar.h:265: warning: no previous prototype for 'mb_copy' ../../../lib/mbchar.h: In function 'mb_copy': ../../../lib/mbchar.h:269: warning: '__inline_memcpy_chk' is static but used in inline function 'mb_copy' which is not static In file included from ../../../lib/mbuiter.h:107, from ../../../lib/mbschr.c:24: ../../../lib/mbchar.h: At top level: ../../../lib/mbchar.h:313: warning: no previous prototype for 'is_basic' In file included from ../../../lib/mbschr.c:24: ../../../lib/mbuiter.h:129: warning: no previous prototype for 'mbuiter_multi_next' In file included from ../../../lib/mbschr.c:24: ../../../lib/mbuiter.h:190: warning: no previous prototype for 'mbuiter_multi_reloc' ../../../lib/mbuiter.h:196: warning: no previous prototype for 'mbuiter_multi_copy' ../../../lib/mbuiter.h: In function 'mbuiter_multi_copy': ../../../lib/mbuiter.h:199: warning: '__inline_memcpy_chk' is static but used in inline function 'mbuiter_multi_copy' which is not static In file included from ../../../lib/mbschr.c:24: ../../../lib/mbuiter.h:201: warning: '__inline_memset_chk' is static but used in inline function 'mbuiter_multi_copy' which is not static ../../../lib/mbschr.c: In function 'mbschr': ../../../lib/mbschr.c:46: warning: cast discards qualifiers from pointer target type CC mbsrchr.o In file included from ../../../lib/mbuiter.h:107, from ../../../lib/mbsrchr.c:24: ../../../lib/mbchar.h:244: warning: no previous prototype for 'mb_width_aux' ../../../lib/mbchar.h: In function 'mb_width_aux': ../../../lib/mbchar.h:249: warning: 'iswcntrl' is static but used in inline function 'mb_width_aux' which is not static In file included from ../../../lib/mbuiter.h:107, from ../../../lib/mbsrchr.c:24: ../../../lib/mbchar.h: At top level: ../../../lib/mbchar.h:265: warning: no previous prototype for 'mb_copy' ../../../lib/mbchar.h: In function 'mb_copy': ../../../lib/mbchar.h:269: warning: '__inline_memcpy_chk' is static but used in inline function 'mb_copy' which is not static In file included from ../../../lib/mbuiter.h:107, from ../../../lib/mbsrchr.c:24: ../../../lib/mbchar.h: At top level: ../../../lib/mbchar.h:313: warning: no previous prototype for 'is_basic' In file included from ../../../lib/mbsrchr.c:24: ../../../lib/mbuiter.h:129: warning: no previous prototype for 'mbuiter_multi_next' In file included from ../../../lib/mbsrchr.c:24: ../../../lib/mbuiter.h:190: warning: no previous prototype for 'mbuiter_multi_reloc' ../../../lib/mbuiter.h:196: warning: no previous prototype for 'mbuiter_multi_copy' ../../../lib/mbuiter.h: In function 'mbuiter_multi_copy': ../../../lib/mbuiter.h:199: warning: '__inline_memcpy_chk' is static but used in inline function 'mbuiter_multi_copy' which is not static In file included from ../../../lib/mbsrchr.c:24: ../../../lib/mbuiter.h:201: warning: '__inline_memset_chk' is static but used in inline function 'mbuiter_multi_copy' which is not static ../../../lib/mbsrchr.c: In function 'mbsrchr': ../../../lib/mbsrchr.c:45: warning: cast discards qualifiers from pointer target type CC mbswidth.o CC mbuiter.o In file included from ../../../lib/mbuiter.h:107, from ../../../lib/mbuiter.c:4: ../../../lib/mbchar.h:244: warning: no previous prototype for 'mb_width_aux' ../../../lib/mbchar.h: In function 'mb_width_aux': ../../../lib/mbchar.h:249: warning: 'iswcntrl' is static but used in inline function 'mb_width_aux' which is not static In file included from ../../../lib/mbuiter.h:107, from ../../../lib/mbuiter.c:4: ../../../lib/mbchar.h: At top level: ../../../lib/mbchar.h:265: warning: no previous prototype for 'mb_copy' ../../../lib/mbchar.h: In function 'mb_copy': ../../../lib/mbchar.h:269: warning: '__inline_memcpy_chk' is static but used in inline function 'mb_copy' which is not static In file included from ../../../lib/mbuiter.h:107, from ../../../lib/mbuiter.c:4: ../../../lib/mbchar.h: At top level: ../../../lib/mbchar.h:313: warning: no previous prototype for 'is_basic' In file included from ../../../lib/mbuiter.c:4: ../../../lib/mbuiter.h:129: warning: no previous prototype for 'mbuiter_multi_next' In file included from ../../../lib/mbuiter.c:4: ../../../lib/mbuiter.h:190: warning: no previous prototype for 'mbuiter_multi_reloc' ../../../lib/mbuiter.h:196: warning: no previous prototype for 'mbuiter_multi_copy' CC pipe2.o In file included from ../../../lib/pipe2.c:26: ../../../lib/binary-io.h:50: warning: no previous prototype for 'set_binary_mode' CC pipe2-safer.o CC printf-frexp.o CC printf-frexpl.o CC progname.o CC quotearg.o CC sig-handler.o In file included from ../../../lib/sig-handler.c:4: ../../../lib/sig-handler.h:35: warning: no previous prototype for 'get_handler' CC spawn-pipe.o CC stdio.o CC strnlen1.o CC threadlib.o CC unistd.o CC dup-safer.o CC fd-safer.o CC pipe-safer.o CC width.o CC wait-process.o CC wctype-h.o CC xmalloc.o CC xalloc-die.o CC xsize.o In file included from ../../../lib/xsize.c:4: ../../../lib/xsize.h:60: warning: no previous prototype for 'xsum' In file included from ../../../lib/xsize.c:4: ../../../lib/xsize.h:71: warning: no previous prototype for 'xsum3' ../../../lib/xsize.h:81: warning: no previous prototype for 'xsum4' ../../../lib/xsize.h:91: warning: no previous prototype for 'xmax' CC xstrndup.o CC get-errno.o CC abitset.o CC bitset.o CC bitset_stats.o CC bitsetv.o CC ebitset.o CC lbitset.o CC vbitset.o CC bitsetv-print.o CC timevar.o CC asnprintf.o CC error.o CC fpending.o CC fprintf.o CC fseterr.o CC getopt.o ../../../lib/getopt.c: In function '_getopt_internal_r': ../../../lib/getopt.c:778: warning: cast discards qualifiers from pointer target type ../../../lib/getopt.c: In function 'rpl_getopt': ../../../lib/getopt.c:1159: warning: cast discards qualifiers from pointer target type CC getopt1.o CC isnand.o CC isnanf.o CC isnanl.o CC obstack.o CC obstack_printf.o CC open.o CC perror.o CC printf.o CC printf-args.o CC printf-parse.o In file included from ../../../lib/printf-parse.c:73: ../../../lib/xsize.h:60: warning: no previous prototype for 'xsum' In file included from ../../../lib/printf-parse.c:73: ../../../lib/xsize.h:71: warning: no previous prototype for 'xsum3' ../../../lib/xsize.h:81: warning: no previous prototype for 'xsum4' ../../../lib/xsize.h:91: warning: no previous prototype for 'xmax' CC rawmemchr.o ../../../lib/rawmemchr.c: In function 'rawmemchr': ../../../lib/rawmemchr.c:47: warning: cast discards qualifiers from pointer target type ../../../lib/rawmemchr.c:132: warning: cast discards qualifiers from pointer target type ../../../lib/rawmemchr.c:135: warning: cast discards qualifiers from pointer target type CC snprintf.o CC sprintf.o CC stat.o CC strchrnul.o ../../../lib/strchrnul.c: In function 'strchrnul': ../../../lib/strchrnul.c:49: warning: cast discards qualifiers from pointer target type ../../../lib/strchrnul.c:138: warning: cast discards qualifiers from pointer target type ../../../lib/strchrnul.c:141: warning: cast discards qualifiers from pointer target type CC strerror.o ../../../lib/strerror.c: In function 'rpl_strerror': ../../../lib/strerror.c:46: warning: cast discards qualifiers from pointer target type CC strerror-override.o CC strerror_r.o CC strverscmp.o CC vasnprintf.o In file included from ../../../lib/vasnprintf.c:89: ../../../lib/xsize.h:60: warning: no previous prototype for 'xsum' In file included from ../../../lib/vasnprintf.c:89: ../../../lib/xsize.h:71: warning: no previous prototype for 'xsum3' ../../../lib/xsize.h:81: warning: no previous prototype for 'xsum4' ../../../lib/xsize.h:91: warning: no previous prototype for 'xmax' CC vfprintf.o CC vsnprintf.o CC vsprintf.o CC wcwidth.o CC xmemdup0.o AR libbison.a /opt/local/bin/ranlib: file: libbison.a(fd-hook.o) has no symbols /opt/local/bin/ranlib: file: libbison.a(math.o) has no symbols /opt/local/bin/ranlib: file: libbison.a(stdio.o) has no symbols /opt/local/bin/ranlib: file: libbison.a(threadlib.o) has no symbols /opt/local/bin/ranlib: file: libbison.a(unistd.o) has no symbols /opt/local/bin/ranlib: file: libbison.a(wctype-h.o) has no symbols ranlib: file: libbison.a(fd-hook.o) has no symbols ranlib: file: libbison.a(math.o) has no symbols ranlib: file: libbison.a(stdio.o) has no symbols ranlib: file: libbison.a(threadlib.o) has no symbols ranlib: file: libbison.a(unistd.o) has no symbols ranlib: file: libbison.a(wctype-h.o) has no symbols gmake[3]: Leaving directory `/Users/akim/src/gnu/bison-2.5/_build/44-debug/lib' gmake[2]: Leaving directory `/Users/akim/src/gnu/bison-2.5/_build/44-debug/lib'
0001-xalloc-add-missing-prototype.patch
Description: Binary data