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



  In message <m10Fie3-000390C@ocean.lucon.org>you write:
  > Could you please show me how to use __attribute__ ((weak))? The code
  > below doesn't make "foo" weak. BTW,
  > 
  > #pragma weak foo
  > 
  > works fine.
  >  
  > Thanks.
  > 
  > 
  > -- 
  > H.J. Lu (hjl@gnu.org)
  > ---
  > extern void foo () __attribute__ ((weak));
  > 
  > bar ()
  > {
  >   if (foo) foo ();
  > }
Sigh.  There's a bug in our weak support.

It looks easy to fix, but I want to think about it for a little while.

It may be best to go ahead and use pragma for egcs-1.1.x and an attribute
in the mainline tree.

jeff


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