[m-rev.] diff: fix bug with `mmc -c --reserve-tag'

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Feb 27 18:29:31 AEDT 2002


Estimated hours taken: 0.5
Branches: main

Fix a bug which broke tests/hard_coded/split_c_files in `.rt' grades.

compiler/mercury_compile.m:
	When invoking the C compiler, pass `-DMR_RESERVE_TAG' if the
	--reserve-tag option was enabled.

Workspace: /home/ceres/fjh/mercury
Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.234
diff -u -d -r1.234 mercury_compile.m
--- compiler/mercury_compile.m	23 Feb 2002 03:47:18 -0000	1.234
+++ compiler/mercury_compile.m	27 Feb 2002 07:26:19 -0000
@@ -3686,6 +3686,12 @@
 	;
 		UseTrailOpt = ""
 	},
+	globals__io_lookup_bool_option(reserve_tag, ReserveTag),
+	{ ReserveTag = yes ->
+		ReserveTagOpt = "-DMR_RESERVE_TAG "
+	;
+		ReserveTagOpt = ""
+	},
 	globals__io_lookup_bool_option(use_minimal_model, MinimalModel),
 	{ MinimalModel = yes ->
 		MinimalModelOpt = "-DMR_USE_MINIMAL_MODEL "
@@ -3751,7 +3757,7 @@
 		ProfileDeepOpt, PIC_Reg_Opt, TagsOpt, NumTagBitsOpt,
 		Target_DebugOpt, LL_DebugOpt,
 		StackTraceOpt, RequireTracingOpt,
-		UseTrailOpt, MinimalModelOpt, TypeLayoutOpt,
+		UseTrailOpt, ReserveTagOpt, MinimalModelOpt, TypeLayoutOpt,
 		InlineAllocOpt, WarningOpt, CFLAGS,
 		" -c ", C_File, " ", NameObjectFile, O_File], Command) },
 	invoke_system_command(Command, Succeeded),

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