[mercury-users] foreign_code

Simon Taylor stayl at cs.mu.OZ.AU
Fri Feb 21 19:05:34 AEDT 2003


On 21-Feb-2003, Michael Day <mikeday at yeslogic.com> wrote:
> > No. `foreign_proc' pragmas will be duplicated when they are inlined,
> > and `foreign_decl' pragmas will be #included wherever the `foreign_proc'
> > pragmas could be inlined, but `foreign_code' pragmas should only
> > occur once in the generated code.
> 
> Well, that seems true for hlc.gc, but when I build the same code in
> asm_fast.gc I get link errors as an array appears to be duplicated in two
> modules. Making it static solves the problem. The array is prototyped as
> extern foo[]; in a foreign_decl and declared in a foreign_code following
> it.
> 
> (I believe I may have raised this issue before).

I've tried to reproduce this and failed.
As always, your chances of a prompt bug fix
are greatly enhanced by a test case.

Simon.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list