extended foreign decls

Tyson Dowd trd at cs.mu.OZ.AU
Wed Jan 3 04:10:02 EST 2001

On 03-Jan-2001, Tyson Richard DOWD <trd at cs.mu.OZ.AU> wrote:
> On 03-Jan-2001, Manuel M. T. Chakravarty <chak at cse.unsw.edu.au> wrote:
> > * As I understand, these pragmas are supposed to support not
> >   only C.  How about C++ code?  Will there be a C++ backend
> >   for Mercury just to make this code efficient?
> No.  There's only (at most) one language per backend that can be inlined
> in this way.  Otherwise you have to do your best.  You can inline the C
> wrapper code that is used to call into C++, but that's about it.

Actually perhaps you can if the `extern inline' trick works across C and

But in general you can't.  For example you'll probably never be able to
inline Java from a C backend.

       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #

More information about the FFI mailing list