[mercury-users] foreign_code
Michael Day
mikeday at yeslogic.com
Fri Feb 21 11:31:59 AEDT 2003
> 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).
Michael
--------------------------------------------------------------------------
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