Hi! On Wed, Mar 04, 2020 at 03:24:52PM +0800, binbin wrote: > >>+extern union GTY(()) section *toc_section; > > > >Why does this add "union"? > > If "union" is not added, it reports error showing unknown type name > ‘section’ > in file included from ../../host-powerpc64le-unknown-linux-gnu/gcc/tm.h:25, > from ../.././libgcc/generic-morestack-thread.c:29: > extern GTY(()) section *toc_section.
This means that there is no declaration of "section" before this. It is not correct to implicitly declare the union like this: the scope of that declaration is the function declaration, making this union a different type from any later uses of it! (This problem is more commonly seen with struct, but it is exactly the same with union). You should make sure "section" is declared before this, instead. Segher