This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ATTRIBUTE_WEAK


> 
> Hi,
> 
> Bill Currie:
> > Correct me if I'm wrong, but isn't __attribute__ ((weak)) for when you
> > *define* a function, rather than reference it?
> 
> "weak" has two meanings.
> (a) don't complain if this gets overridden.
> (b) don't complain if this doesn't exist at all.
> 

More accurately:

(b) don't complain and set it to zero if this doesn't exist at all.

-- 
H.J. Lu (hjl@gnu.org)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]