[LLVMdev] Linking two external linkage GlobalValues
ralph at inputplus.co.uk
Sat May 26 13:16:35 PDT 2007
> This is bug in the source code. You have two symbols with the same
> name in the different object files, which is definite redefinition. At
> least one of them should be declared with "extern".
C allows this.
$ head foo.c bar.c
==> foo.c <==
==> bar.c <==
foo = 42;
$ gcc -Wall foo.c bar.c && ./a.out; echo $?
Better practice to have one definition I agree, but it's valid C.
More information about the llvm-dev