5.5 GCC-4.5.1 - Pass 1 - c99 mode compilation error - openSUSE (host)

gnu2007-lfs at yahoo.co.in gnu2007-lfs at yahoo.co.in
Sun Nov 14 05:56:05 PST 2010


Can anyone please suggest any fix for the following compilation error.
I am at the 5.5 GCC-4.5.1 Pass 1 section of LFS book.
Host is openSUSE 11.3
gcc -DHAVE_CONFIG_H -I. -I../../gcc-4.5.1/mpc  -DNDEBUG    -Wall -Wextra -Wno-deprecated-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wstrict-prototypes -Wcast-qual -Wwrite-strings -g -O2 -MT src_mpc-main.o -MD -MP -MF .deps/src_mpc-main.Tpo -c -o src_mpc-main.o `test -f 'src/main.c' || echo '../../gcc-4.5.1/mpc/'`src/main.c
../../gcc-4.5.1/mpc/src/main.c: In function 'find_command':
../../gcc-4.5.1/mpc/src/main.c:199:2: error: 'for' loop initial declarations are only allowed in C99 mode
../../gcc-4.5.1/mpc/src/main.c:199:2: note: use option -std=c99 or -std=gnu99 to compile your code
make[3]: *** [src_mpc-main.o] Error 1
make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/mpc'
make[1]: *** [all-mpc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20101114/fc714487/attachment.html>


More information about the lfs-support mailing list