On Mon, Sep 6, 2010 at 10:51 PM, Kai Ruottu <kai.ruo...@wippies.com> wrote: > This seems to be defined in a header generated during the build > into the $BUILD/gcc : > > [r...@localhost gcc]# grep ggc_alloc_cleared_lang_type *.h > gtype-desc.h:#define ggc_alloc_cleared_lang_type_u() ((union lang_type_u > *)(ggc_internal_cleared_alloc_stat (sizeof (union lang_type_u) > MEM_STAT_INFO))) > > On CentOS 5.5/ia32 the build seemed to succeed for the > 'x86_64-linux-gnu' target, using gcc-4.1.2 as the host > and build compiler. Must check the Fedora 13/x86_64 > host with its gcc-4.4.4 too but I wouldn't expect any > change with it... > > So maybe the Gentoo distro has some problem...
No, I've tried compiling gcc-4.6-20100911 on ubuntu 10.04, the same problem also happened; and I also found that macro was defined in a generated header file, in the gcc build directory; renq...@flyer-1-1:~/src/gcc-4.6-build$ grep -RsInw ggc_alloc_cleared_lang_type gcc/ gcc/gtype-desc.h:2451:#define ggc_alloc_cleared_lang_type() ((struct lang_type *)(ggc_internal_cleared_alloc_stat (sizeof (struct lang_type) MEM_STAT_INFO))) this definition just doesn't accept any arguments, but inside gcc/c-decl.c:7028 and 7311: space = ggc_alloc_cleared_lang_type (sizeof (struct lang_type)); lt = ggc_alloc_cleared_lang_type (sizeof (struct lang_type)); both passes 1 argument, so the compiler report error, so the problem is how can you succeed compiling that? renq...@flyer-1-1:~/src/gcc-4.6-build$ (cd gcc/; gcc -c -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.6-20100911/gcc -I../../gcc-4.6-20100911/gcc/. -I../../gcc-4.6-20100911/gcc/../include -I../../gcc-4.6-20100911/gcc/../libcpp/include -I/opt/gektop/usr/include -I../../gcc-4.6-20100911/gcc/../libdecnumber -I../../gcc-4.6-20100911/gcc/../libdecnumber/bid -I../libdecnumber ../../gcc-4.6-20100911/gcc/c-decl.c) ../../gcc-4.6-20100911/gcc/c-decl.c: In function ‘grokdeclarator’: ../../gcc-4.6-20100911/gcc/c-decl.c:5536: warning: format not a string literal and no format arguments ../../gcc-4.6-20100911/gcc/c-decl.c: In function ‘grokparms’: ../../gcc-4.6-20100911/gcc/c-decl.c:6197: warning: format not a string literal and no format arguments ../../gcc-4.6-20100911/gcc/c-decl.c:7028:64: error: macro "ggc_alloc_cleared_lang_type" passed 1 arguments, but takes just 0 ../../gcc-4.6-20100911/gcc/c-decl.c: In function ‘finish_struct’: ../../gcc-4.6-20100911/gcc/c-decl.c:7028: error: ‘ggc_alloc_cleared_lang_type’ undeclared (first use in this function) ../../gcc-4.6-20100911/gcc/c-decl.c:7028: error: (Each undeclared identifier is reported only once ../../gcc-4.6-20100911/gcc/c-decl.c:7028: error: for each function it appears in.) ../../gcc-4.6-20100911/gcc/c-decl.c:7311:62: error: macro "ggc_alloc_cleared_lang_type" passed 1 arguments, but takes just 0 ../../gcc-4.6-20100911/gcc/c-decl.c: In function ‘finish_enum’: ../../gcc-4.6-20100911/gcc/c-decl.c:7311: error: ‘ggc_alloc_cleared_lang_type’ undeclared (first use in this function) Thanks,