HyperQuantum
2008-Feb-29 14:16 UTC
[LLVMdev] conflicting declarations in output of C back end
I stumbled upon the following error: psp-gcc -I. -I/home/kevin/Documents/School/Thesis/work/install/psptoolchain/psp/sdk/include -Wall -O1 -G0 -ILIB_zlib -ILIB_libpng -D_PSP_FW_VERSION=150 -c -o llvmoutput.o llvmoutput.c llvmoutput.c:619: error: conflicting types for '_impure_ptr' /home/kevin/Documents/School/2eLIC/Thesis/work/install/psptoolchain/bin/../lib/gcc/psp/4.1.0/../../../../psp/include/sys/reent.h:793: error: previous declaration of '_impure_ptr' was here The declaration in sys/reent.h: extern struct _reent *_impure_ptr __ATTRIBUTE_IMPURE_PTR__; And the one generated by the C back end: /* External Global Variable Declarations */ extern struct l_struct_2E__reent *_impure_ptr; So I guess somewhere in the compilation process the struct "_reent" is renamed by LLVM but then conflicts with the original declaration? The file "reent.h" got included indirectly by "alloca.h" and this is probably not expected. How can I solve this problem? Thanks, Kevin André
Chris Lattner
2008-Feb-29 17:07 UTC
[LLVMdev] conflicting declarations in output of C back end
On Fri, 29 Feb 2008, HyperQuantum wrote:> So I guess somewhere in the compilation process the struct "_reent" is > renamed by LLVM but then conflicts with the original declaration? > The file "reent.h" got included indirectly by "alloca.h" and this is > probably not expected. How can I solve this problem?The best way is to fix the CBE output to not #include alloca.h. There are #ifdefs that control how alloca is referenced. -Chris -- http://nondot.org/sabre/ http://llvm.org/