[m-dev.] diff: fix bugs in runtime/mercury_bootstrap.c

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Oct 6 06:52:50 AEST 1999


Estimated hours taken: 0.25

runtime/mercury_bootstrap.c:
	Fix a problem where it was getting compile errors in grades
	`jump' and `fast', due to use of the ENTRY() macro in initializers.
	Also fix a warning about "no previous prototype" for call_engine().

Workspace: /d-drive/home/hg/fjh/mercury
Index: runtime/mercury_bootstrap.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_bootstrap.c,v
retrieving revision 1.18
diff -u -r1.18 mercury_bootstrap.c
--- runtime/mercury_bootstrap.c	1999/09/27 05:20:42	1.18
+++ runtime/mercury_bootstrap.c	1999/10/05 20:48:43
@@ -43,8 +43,8 @@
 Define_extern_entry(mercury____Index___std_util__type_info_0_0_bootstrap);
 Define_extern_entry(mercury____Compare___std_util__type_info_0_0_bootstrap);
 
+#if !defined(USE_NONLOCAL_GOTOS) || defined(USE_ASM_LABELS)
 
-
 const struct MR_TypeCtorInfo_struct
 mercury_data_std_util__type_ctor_info_type_info_0 = {
 	(Integer) 0,
@@ -58,6 +58,15 @@
 	string_const("type_info", 9)
 };
 
+#else /* defined(USE_NONLOCAL_GOTOS) && !defined(USE_ASM_LABELS) */
+
+/*
+** Can't use ENTRY(...) in initializers, so just don't bother;
+** backwards compatibility isn't important for these grades.
+*/
+
+#endif
+
 
 BEGIN_MODULE(unify_univ_module_bootstrap)
 	init_entry(mercury____Unify___std_util__type_info_0_0_bootstrap);
@@ -114,7 +123,7 @@
 	unify_univ_module_bootstrap();
 }
 
-void
-call_engine(Code *entry_point) {
+void call_engine(Code *entry_point); /* suppress gcc -Wmissing-decl warning */
+void call_engine(Code *entry_point) {
 	(void) MR_call_engine(entry_point, FALSE);
 }

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