[LLVMdev] [patch] emit .weak for zero initialized weak variables

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Dec 26 08:47:55 PST 2006

> Is there a semantic difference between the two?  Just because GCC compiles
> them to different things, it doesn't mean they do different things...

Sorry for the long delay...

On a x86 box I am able to use both declarations interchangeably. There
is a  problem if we have both a declaration and an use on the same
file: We must print a ".weak" because of the use, but if we printed a
".comm" for the declaration, the assembler will reject the file:

Error: symbol `a' can not be both weak and common

Best Regards,

More information about the llvm-dev mailing list