Problem with extern function declarations

Johannes Pfau via D.gnu d.gnu at puremagic.com
Tue Apr 21 07:10:35 PDT 2015


Am Tue, 21 Apr 2015 11:42:40 +0000
schrieb "Jens Bauer" <doctor at who.no>:

> 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 ?

Didn't this[1] commit fix the problem?

[1]
https://github.com/D-Programming-GDC/GDC/commit/85c65ea7304700c69fcffd51db9589d2cbc1fe03


More information about the D.gnu mailing list