This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Errors Compiling GCC 3.2.2 on Fedora Core4


Edit the file include/obstack.h in the gcc-3.2.2 source package. Go to line 423 and change it from:
*((void **)__o->next_free)++ = ((void *)datum); \
to:
*((void **)__o->next_free) = ((void *)datum); \
and add the line
__o->next_free += sizeof(void *); \
immediately beneath.


Don't forget the "\" at the ends of the lines after the ";". They are part of the code. I did this on FC4 after having the exact same problems. Everything compiled and installed fine after that. This patch comes from Adrian Reber (https://www.redhat.com/archives/fedora-extras-list/2005-March/msg01037.html)

Andy H.

>make bootstrap
>
>I eventually get the error:
>
>make[2]: Entering directory `/export/packages/gcc/objdir/gcc'
>gcc -c -DIN_GCC -g -W -Wall -Wwrite-strings -Wstrict-prototypes >-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long >-DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I../../gcc-3.2.2/gcc >-I../../gcc-3.2.2/gcc/. -I../../gcc-3.2.2/gcc/config >-I../../gcc-3.2.2/gcc/../include ../../gcc-3.2.2/gcc/read-rtl.c -o >read-rtl.o
>In file included from ../../gcc-3.2.2/gcc/read-rtl.c:24:
>../../gcc-3.2.2/gcc/rtl.h:125: warning: type of bit-field ‘code’ is a >GCC extension
>../../gcc-3.2.2/gcc/rtl.h:128: warning: type of bit-field ‘mode’ is a >GCC extension
>../../gcc-3.2.2/gcc/read-rtl.c: In function ‘fatal_with_file_and_line’:
>../../gcc-3.2.2/gcc/read-rtl.c:62: warning: traditional C rejects ISO C >style function definitions
>../../gcc-3.2.2/gcc/read-rtl.c: In function ‘read_rtx’:
>../../gcc-3.2.2/gcc/read-rtl.c:662: error: invalid lvalue in increment
>make[2]: *** [read-rtl.o] Error 1
>make[2]: Leaving directory `/export/packages/gcc/objdir/gcc'
>make[1]: *** [stage1_build] Error 2
>make[1]: Leaving directory `/export/packages/gcc/objdir/gcc'
>make: *** [bootstrap] Error 2
>
>I have gcc 4.0.0 installed on teh box too.
>
>Any help would be gratefully received.
>
>Mike



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]