> Wed, 24 May 2000 08:15:24 -0700, Julian Seward (Intl Vendor)
> <[EMAIL PROTECTED]> pisze:
>
> > GHC can produce C code which you can compile with gcc, without
> > special support -- we call this "unregisterised" code. This code
> > needs some GNU extensions -- named initialisers, zero length arrays
> > and (I think) support for 64-bit arithmetic. So it is not strict
> > ANSI C89 code, although it looks all 3 extensions will be the
> > ANSI C9X standard.
>
> The C99 standard has been already approved, by both ISO and recently
> ANSI. It does have named initialisers, zero length arrays and 64bit
> types.
>
> But foreign export dynamic cannot be done portably. Are IO exceptions
> portable? What about standard libraries, e.g. IO?
If the question is whether compiler-generated .hc code can be made
independent of the target architecture, then I believe the answer is yes.
The only architecture-dependent feature in ghc/lib/std is an extra IO
exception for Win32 (ComError), and there's no reason we couldn't include
that on every architecture.
For optimised (ie. registerised tail-calling assembly mangled etc.) .hc
compilation, currently the call/return convention depends on the target
architecture, because we optimise the conventions based on the number of
registers available on the target. For unregisterised .hc compilation,
however, we fall back to a no-register call/return convention.
Cheers,
Simon