On Thu, 2009-06-25 at 13:32 -0700, Ian Lance Taylor wrote: > I am pleased to report that if you configure gcc with > --enable-build-with-cxx, which causes the core compiler to be built > using a C++ compiler, a bootstrap on x86_64-unknown-linux-gnu now > completes. > > I would like to encourage people to try using --enable-build-with-cxx in > other configuration--other bootstraps, cross-compilers--to see how well > it works. Please let me know if you run into problems that you don't > know how, or don't have time, to fix.
Hi, Wanting to test Ada on the branch, after checkout I did on x86_64-linux: ../gcc/configure --enable-languages=c,c++,ada --enable-__cxa_atexit --disable-nls --enable-threads=posix --with-mpfr=/opt/cfarm/mpfr-2.4.1/ --with-gmp=/opt/cfarm/gmp-4.2.4/ --prefix=/n/16/guerby/cxx/install --enable-build-with-cxx make bootstrap ... g++ -c -g -g -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I/opt/cfarm/gmp-4.2.4//include -I/opt/cfarm/mpfr-2.4.1//include -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber ../../gcc/gcc/c-decl.c -o c-decl.o /usr/include/libintl.h:40: error: expected unqualified-id before ‘const’ /usr/include/libintl.h:40: error: expected `)' before ‘const’ /usr/include/libintl.h:40: error: expected initializer before ‘const’ /usr/include/libintl.h:81: error: expected unqualified-id before ‘const’ /usr/include/libintl.h:81: error: expected `)' before ‘const’ /usr/include/libintl.h:81: error: expected initializer before ‘const’ /usr/include/libintl.h:85: error: expected unqualified-id before ‘const’ /usr/include/libintl.h:85: error: expected `)' before ‘const’ /usr/include/libintl.h:85: error: expected initializer before ‘const’ ../../gcc/gcc/c-decl.c: In function ‘tree_node* finish_enum(tree_node*, tree_node*, tree_node*)’: ../../gcc/gcc/c-decl.c:7011: warning: comparison between signed and unsigned integer expressions ../../gcc/gcc/c-decl.c:7032: warning: comparison between signed and unsigned integer expressions make[3]: *** [c-decl.o] Error 1 make[3]: Leaving directory `/home/guerby/cxx/build/gcc' make[2]: *** [all-stage1-gcc] Error 2 make[2]: Leaving directory `/home/guerby/cxx/build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/home/guerby/cxx/build' make: *** [bootstrap] Error 2 Given the error is in non Ada-related code I guess this has to do with the base C++ compiler and system headers in C++ mode, gcc16 is running Debian 4.0 and GCC 4.1.2 (which works for trunk bootstrap of c,c ++,ada): gue...@gcc16:~/cxx/build$ g++ --version g++ (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) gcc16 has a collection of GCC versions: gue...@gcc16:~/cxx/build$ ls /opt/cfarm/release/ 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.3.1 4.3.2 4.3.3 4.4.0 Using 4.2.3 as base compiler failed with the same error as system 4.1.2. Using 4.3.3 and 4.4.0 as base compiler bootstrap failed on Ada-related stuff, here gcc/ada/gcc-interface/decl.c: g++ -c -g -g -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -fno-common -DHAVE_CONFIG_H -I.. -I. -Iada -I../../gcc/gcc -I../../gcc/gcc/ada -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -\ I/opt/cfarm/gmp-4.2.4//include -I/opt/cfarm/mpfr-2.4.1//include -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber ../../gcc/gcc/ada/gcc-interface/decl.c -o ada/decl.o ../../gcc/gcc/ada/gcc-interface/decl.c: In function 'tree_node* substitute_in_type(tree_node*, tree_node*, tree_node*)': ../../gcc/gcc/ada/gcc-interface/decl.c:7791: error: expected unqualified-id before 'new' ../../gcc/gcc/ada/gcc-interface/decl.c:7812: error: expected type-specifier before '=' token ../../gcc/gcc/ada/gcc-interface/decl.c:7812: error: lvalue required as left operand of assignment ../../gcc/gcc/ada/gcc-interface/decl.c:7813: error: expected type-specifier before ')' token ../../gcc/gcc/ada/gcc-interface/decl.c:7813: error: request for member 'base' in '*(int*)__t', which is of non-class type 'int' ../../gcc/gcc/ada/gcc-interface/decl.c:7813: error: request for member 'base' in '*(int*)__t', which is of non-class type 'int' ../../gcc/gcc/ada/gcc-interface/decl.c:7813: error: request for member 'base' in '*(int*)__t', which is of non-class type 'int' ../../gcc/gcc/ada/gcc-interface/decl.c:7813: error: request for member 'base' in '*(int*)__t', which is of non-class type 'int' ../../gcc/gcc/ada/gcc-interface/decl.c:7813: error: request for member 'base' in '*(int*)__t', which is of non-class type 'int' ../../gcc/gcc/ada/gcc-interface/decl.c:7813: error: cannot convert 'int* const' to 'const tree_node*' for argument '1' to 'void tree_check_failed(const tree_node*, const char*, int, const char*, ...)' ../../gcc/gcc/ada/gcc-interface/decl.c:7813: error: request for member 'type' in '*({...})', which is of non-class type 'int' ../../gcc/gcc/ada/gcc-interface/decl.c:7814: error: expected type-specifier before ')' token [...] make[3]: *** [ada/decl.o] Error 1 make[3]: Leaving directory `/home/guerby/cxx/build/gcc' make[2]: *** [all-stage1-gcc] Error 2 make[2]: Leaving directory `/home/guerby/cxx/build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/home/guerby/cxx/build' make: *** [bootstrap] Error 2 I guess this has to do with reserved word conflict on "new": << tree substitute_in_type (tree t, tree f, tree r) { tree new; >> Do you have some way to deal with this? Sincerely, Laurent