This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ATTRIBUTE_WEAK
- To: hjl at lucon dot org (H.J. Lu)
- Subject: Re: ATTRIBUTE_WEAK
- From: Jeffrey A Law <law at hurl dot cygnus dot com>
- Date: Wed, 24 Feb 1999 22:42:59 -0700
- cc: egcs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
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