[m-rev.] diff: fix for tests/valid/lambda_quant failure

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Mar 4 18:50:36 AEDT 2002


Estimated hours taken: 0.25
Branches: main

Fix a bug with the handling of zero-arity higher-order types that broke
tests/valid/lambda_quant.m.  The bug was exposed by my recent change to
generate closure layouts in the MLDS back-end.

runtime/mercury.h:
	Define MR_HO_PseudoTypeInfo_Struct0.

Workspace: /home/ceres/fjh/mercury
Index: runtime/mercury.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury.h,v
retrieving revision 1.51
diff -u -d -r1.51 mercury.h
--- runtime/mercury.h	18 Feb 2002 07:01:12 -0000	1.51
+++ runtime/mercury.h	4 Mar 2002 07:43:34 -0000
@@ -234,6 +234,13 @@
 MR_FIRST_ORDER_PSEUDOTYPEINFO_STRUCT(MR_FO_PseudoTypeInfo_Struct19, 19);
 MR_FIRST_ORDER_PSEUDOTYPEINFO_STRUCT(MR_FO_PseudoTypeInfo_Struct20, 20);
 
+/*
+** Since standard C doesn't support zero-sized arrays,
+** we use the same type for unary higher-order pseudo-type-infos
+** as for zero-arity higher-order pseudo-type-infos.
+*/
+typedef struct MR_HO_PseudoTypeInfo_Struct1 MR_HO_PseudoTypeInfo_Struct0;
+
 typedef struct MR_HO_PseudoTypeInfo_Struct1 MR_HO_PseudoTypeInfo_Struct1;
 typedef struct MR_HO_PseudoTypeInfo_Struct2 MR_HO_PseudoTypeInfo_Struct2;
 typedef struct MR_HO_PseudoTypeInfo_Struct3 MR_HO_PseudoTypeInfo_Struct3;

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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