[m-rev.] for review: fix dummy type bug in construct.construct
Ian MacLarty
maclarty at cs.mu.OZ.AU
Mon Nov 21 22:38:56 AEDT 2005
On Mon, Nov 21, 2005 at 09:01:17PM +1100, Zoltan Somogyi wrote:
> On 19-Nov-2005, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> > The fix is fine, and you can commit it. I have a more extensive fix
> > that also tries to prevent such problems from happening again; I'll
> > commit that after yours and after my bootcheck finishes.
>
> Here it is.
>
> Try to reduce the probability of any bug such as the one reported by
> Peter Ross happening again.
>
> library/construct.m:
> Make sure that the relevant switches list all the values of the enum
> type the switch is on, since this way gcc will generate a warning
> message if the enum has a value added to it and the switch isn't
> updated.
>
> Include the defaults only if MR_INCLUDE_SWITCH_DEFAULTS is defined;
> the intention is that this may be useful with non-gcc compilers.
>
> Generate separate, more specific error messages for each type_ctor_rep.
>
> library/deconstruct.m:
> Delete some old code that we haven't used in a while, and which we
> won't want to use in the future either. (The deleted predicate worked
> on the data representation scheme of the running compiler, whereas
> we wanted it to work on the data representation scheme of the generated
> program, which may be different.)
>
> I found this when inspecting all uses of switch defaults in the
> library.
>
> runtime/mercury_conf_params.h:
> Document MR_INCLUDE_SWITCH_DEFAULTS.
>
> Zoltan.
>
That looks good.
Ian.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list