[m-dev.] for review: fix unsafe_type_cast for MLDS back-end

Peter Ross peter.ross at miscrit.be
Thu Dec 14 00:02:32 AEDT 2000

On Wed, Dec 13, 2000 at 11:30:15PM +1100, Fergus Henderson wrote:
> Peter Ross, could you please review this one?
> I think this change will cause bootstrapping problems if you try to
> bootstrap in grade hlc.gc, since it deletes the definition of
> unsafe_type_cast from runtime/mercury.h which older compilers rely on.
> But it should be fine if you bootstrap in grade asm_fast.gc or
> none.gc.
My usual approach to avoid this problem is to add a #define at the top
of each source file.

This is done by the predicate `mlds_output_src_bootstrap_defines' in the
module `mlds_to_c.m'.

For example


and then protect any code that you deleted or added with the appropiate
#define.  After a week or so, I then go through and remove the #define.

I would prefer if you implemented this approach, but on closer
inspection of the code I don't think it will be possible.  Oh well.

Otherwise the diff looks fine.

mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au

More information about the developers mailing list