[m-rev.] trivial diff: fix hard_coded/backend_external in high-level C grades

Julien Fischer juliensf at cs.mu.OZ.AU
Fri Sep 2 15:06:53 AEST 2005


Estimated hours taken: 0.5
Branches: main

tests/hard_coded/backend_external.m:
	Fix this test in the hl* grades by shifting an #endif that is
	in the wrong spot.  (It looks as though this has always been
	in the wrong place but has only started showing up because of
	the recent changes to mkinit.)

	Eliminate warnings from the C compiler on 64-bit architectures.

Julien.

Index: backend_external.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/backend_external.m,v
retrieving revision 1.2
diff -u -r1.2 backend_external.m
--- backend_external.m	10 Mar 2005 02:36:04 -0000	1.2
+++ backend_external.m	2 Sep 2005 04:36:42 -0000
@@ -26,9 +26,11 @@
 	[will_not_call_mercury, promise_pure, high_level_backend],
 "
 #ifdef MR_HIGHLEVEL_CODE
-	printf(""p(%d): expected highlevel, found highlevel, OK\\n"", N);
+	printf(""p(%"" MR_INTEGER_LENGTH_MODIFIER ""d): "", N);
+	printf(""expected highlevel, found highlevel, OK\\n"");
 #else
-	printf(""p(%d): expected highlevel, found lowlevel, BUG\\n"", N);
+	printf(""p(%"" MR_INTEGER_LENGTH_MODIFIER ""d): "", N);
+	printf(""expected highlevel, found lowlevel, BUG\\n"");
 #endif

 	IO = IO0;
@@ -39,9 +41,11 @@
 	[will_not_call_mercury, promise_pure, low_level_backend],
 "
 #ifdef MR_HIGHLEVEL_CODE
-	printf(""q(%d): expected lowlevel, found highlevel, BUG\\n"", N);
+	printf(""q(%"" MR_INTEGER_LENGTH_MODIFIER ""d): "", N);
+	printf(""expected lowlevel, found highlevel, BUG\\n"");
 #else
-	printf(""q(%d): expected lowlevel, found lowlevel, OK\\n"", N);
+	printf(""q(%"" MR_INTEGER_LENGTH_MODIFIER ""d): "", N);
+	printf(""expected lowlevel, found lowlevel, OK\\n"");
 #endif

 	IO = IO0;
@@ -54,7 +58,8 @@
 void MR_CALL
 backend_external__q_3_p_0(MR_Integer n)
 {
-	printf(""q(%d): expected highlevel, found highlevel, OK\\n"", n);
+	printf(""q(%"" MR_INTEGER_LENGTH_MODIFIER ""d): "", n);
+	printf(""expected highlevel, found highlevel, OK\\n"");
 }

 #else
@@ -65,9 +70,11 @@
 	MR_init_entry(mercury__backend_external__p_3_0);
 MR_BEGIN_CODE
 MR_define_entry(mercury__backend_external__p_3_0);
-	printf(""p(%d): expected lowlevel, found lowlevel, OK\\n"", MR_r1);
+	printf(""p(%"" MR_INTEGER_LENGTH_MODIFIER ""d): "", MR_r1);
+	printf(""expected lowlevel, found lowlevel, OK\\n"");
 	MR_proceed();
 MR_END_MODULE
+#endif

 /* Ensure that the initialization code for the above module gets run. */
 /*
@@ -92,15 +99,13 @@
 }

 void
-mercury_sys_init_backend_external_module_init_type_tables(void)
+mercury_sys_init_backend_external_module_write_out_proc_statics(FILE *fp)
 {
-	/* no types to register */
 }

 void
-mercury_sys_init_backend_external_module_write_out_proc_statics(FILE *fp)
+mercury_sys_init_backend_external_module_init_type_tables(void)
 {
+	/* no types to register */
 }
-
-#endif
 ").

--------------------------------------------------------------------------
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