[llvm-commits] [llvm-gcc-4.2] r71287 - in /llvm-gcc-4.2/trunk: build_gcc gcc/ChangeLog.apple gcc/config/arm/arm.c gcc/cp/mangle.c gcc/objc/ChangeLog.apple gcc/objc/objc-act.c gcc/testsuite/ChangeLog.apple gcc/testsuite/g++.apple/anon-1.C gcc/testsuite/gcc.apple/weak.c gcc/testsuite/objc.dg/property-16.m gcc/tree-eh.c gcc/version.c

Duncan Sands baldrick at free.fr
Wed May 13 12:23:58 PDT 2009


Hi Mike,

> > I don't know why that would be the case.  Also, chosen for symmetry
> > with the case just before it.  I don't see why one can't have a weak
> > definition that winds up not being used that turns out to be not
> > defined as runtime, thus, being 0.  Anything prevent that case?
> 
> Ah, curiouser and curiouser...  I talked with my expert, and at least  
> on darwin, things conspire so that only weak references can be 0.  If  
> it were just weak, it would wind up having a real address.  The case I  
> was thinking about can't happen as the weak definition would be  
> retained and used, thus preventing the address from being 0.

that's how it is modeled in LLVM at least: WeakLinkage => address will
never be 0, ExternalWeakLinkage -> address may be 0.

Ciao,

Duncan.



More information about the llvm-commits mailing list