[m-rev.] for review: --debug warning

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri Mar 7 19:10:54 AEDT 2003


This is to fix problems such as the one reported on mercury-users.

Zoltan.

compiler/handle_options.m:
	Report an error if the user specifies debugging in a grade that doesn't
	support debugging.

Index: handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.176
diff -u -b -r1.176 handle_options.m
--- handle_options.m	1 Mar 2003 06:34:50 -0000	1.176
+++ handle_options.m	7 Mar 2003 06:16:53 -0000
@@ -786,6 +786,16 @@
 		[]
 	),
 
+	(
+		{ given_trace_level_is_none(TraceLevel) = yes
+		; HighLevel = no, Target = c
+		}
+	->
+		[]
+	;
+		usage_error("debugging is available only in low level C grades")
+	),
+
 	% The pthreads headers on some architectures (Solaris, Linux)
 	% don't work with -ansi.
 	option_implies(parallel, ansi_c, bool(no)),
--------------------------------------------------------------------------
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