[LLVMdev] conflicting declarations in output of C back end

HyperQuantum hyperquantum at gmail.com
Fri Feb 29 06:16:11 PST 2008


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é




More information about the llvm-dev mailing list