[mercury-users] foreign_decl vs. foreign_code
Michael Day
mikeday at bigpond.net.au
Tue Feb 12 15:05:52 AEDT 2002
> You can put #ifdefs around it to make sure it doesn't get defined multiple
> times.
>
> I believe I argued that this (or something similar) was a bug some time
> ago, and lost.
Looks like a bug to me, either in the implementation or failing that in
the documentation:
Definitions of foreign language entities (such as functions or global
variables) may be included using a declaration of the form...
The documentation goes on to describe it as being linked in, which
certainly makes it sound like it shouldn't be duplicated. And as to the
problem manifested in asm_fast.gc grade:
Entities declared in `pragma foreign_code' declarations are visible in
`pragma foreign_proc' declarations that specify the same foreign
language and occur in in the same Mercury module.
So, something is wrong.
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