Problem with extern function declarations

Jens Bauer via D.gnu d.gnu at puremagic.com
Tue Apr 21 04:42:40 PDT 2015


On Tuesday, 7 April 2015 at 19:31:25 UTC, Johannes Pfau wrote:
> The recently added weak attribute shows a small difference in 
> behavior compared to c {snip}
>
> __attribute__((weak)) int test();
>
> (nil) 0
> ------------------------
> @attribute("weak") void test();
>
> => unresolved symbol test
>
> The problem is that we mark the function decl as TREE_STATIC. 
> The C compiler marks it as DECL_EXTERNAL instead. Interestingly 
> for variables things work as 'expected' {snip}

I'm still hoping for a solution to this. Should I file a 
bug-report ?


More information about the D.gnu mailing list