I am still stuck at this chapter, I tried by adding -std=c99 while configure; 
and also, by adding to the makefile using vi. But, its not getting fixed.Can 
anyone please suggest any way to fix this?.
--- On Sun, 14/11/10, gnu2007-...@yahoo.co.in <gnu2007-...@yahoo.co.in> wrote:

From: gnu2007-...@yahoo.co.in <gnu2007-...@yahoo.co.in>
Subject: 5.5 GCC-4.5.1 - Pass 1 - c99 mode compilation error - openSUSE (host)
To: lfs-support@linuxfromscratch.org
Date: Sunday, 14 November, 2010, 7:26 PM

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


-----Inline Attachment Follows-----

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to