[mercury-users] foreign_type / foreign_decl

Tyson Dowd trd at cs.mu.OZ.AU
Tue Jul 9 18:31:25 AEST 2002


I believe (from memory) that the current system is that any module that
is generated which contains a foreign_proc or foreign_code, it must also
contain all the foreign_decls from that module.

I think the problem is that this system should now be changed so that
any module which is generated which contains a foreign_type should also
contain all the foreign_decls from the original module.

On 09-Jul-2002, Michael Day <mikeday at bigpond.net.au> wrote:
> 
> foreign_type can be in the interface, but foreign_decl can't. Unless you
> are using intermodule optimization, this will cause errors in the
> generated C code where a foreign_type is used in a function prototype
> without including the necessary C header files that contain its
> definition.
> 
> 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
> --------------------------------------------------------------------------

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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