
Fedora rawhide now ships with a gcc4 preview package - I thought I'd build current-cvs with it. Readline fails to build with gcc4 -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -fno-strict-aliasing -I. -I/home/anthony/src/py/pyhead/dist/src/./Include -I/usr/local/include -I/home/anthony/src/py/pyhead/dist/src/Include -I/home/anthony/src/py/pyhead/dist/src -c /home/anthony/src/py/pyhead/dist/src/Modules/readline.c -o build/temp.linux-i686-2.4/readline.o /home/anthony/src/py/pyhead/dist/src/Modules/readline.c:97: error: static declaration of ‘history_length’ follows non-static declaration /usr/include/readline/history.h:224: error: previous declaration of ‘history_length’ was here test_cfgparser causes a segfault, unfortunately. Since this doesn't occur with any other compilers that I know of (*) I'm inclined to blame gcc4, and not bother too much with it further. I'm pretty short of time, but if someone wants to spend time figuring out why, let me know and I'll dump a SF bugreport with the stack trace &c... Anthony (*) Ok - the HP compiler on HP/UX on Itanium causes segfaults and random breakages _everywhere_ but that's because of the platform.

On Wed, 24 Nov 2004 00:19:53 +1100, Anthony Baxter <anthony@interlink.com.au> wrote:
history_length is exported by readline and our readline module has another history_length for its interal static variable. I could build readline module by renaming the variable.
Seemingly, wrong optimization of gcc4. I was struck by another segfaults from Objects/stringobject.c:1028 and etc. But I could avoid segfaults by disturbing optimizations with some debug outputs. And even full regression test is passed when I built it with -O0. No worry. :) Hye-Shik

On Wed, 24 Nov 2004 00:19:53 +1100, Anthony Baxter <anthony@interlink.com.au> wrote:
history_length is exported by readline and our readline module has another history_length for its interal static variable. I could build readline module by renaming the variable.
Seemingly, wrong optimization of gcc4. I was struck by another segfaults from Objects/stringobject.c:1028 and etc. But I could avoid segfaults by disturbing optimizations with some debug outputs. And even full regression test is passed when I built it with -O0. No worry. :) Hye-Shik
participants (2)
-
Anthony Baxter
-
Hye-Shik Chang