[m-rev.] for review: enable --warn-insts-without-matching-type by default

Ian MacLarty maclarty at csse.unimelb.edu.au
Tue Aug 8 16:17:49 AEST 2006


For review by anyone.

Estimated hours taken: 0.3
Branches: main

Enable --warn-insts-without-matching-type by default.

configure.in:
	Check for this option when checking whether the bootstrap compiler
	is new enough.

compiler/options.m:
	Turn the warning on by default.

library/Mercury.options:
	Disable the warning for io.m and array.m.  These modules contain
	insts with symbols in their bound lists that don't belong to any
	Mercury types, since the corresponding types are foreign types.

Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.461
diff -u -r1.461 configure.in
--- configure.in	7 Aug 2006 06:21:29 -0000	1.461
+++ configure.in	8 Aug 2006 02:28:21 -0000
@@ -312,10 +312,12 @@
 		# Note that we need to set --grade to an LLDS grade
 		# when doing this test because term size profiling
 		# requires an LLDS grade.
-		# This also tests for the --shlib-linker-intall-name-flag
-		# and --warn-known-bad-format-calls options.
+		# This also tests for the --shlib-linker-intall-name-flag,
+		# --warn-known-bad-format-calls and 
+		# --warn-insts-without-matching-type options.
 		$BOOTSTRAP_MC \
 			--grade none.gc \
+			--warn-insts-without-matching-type \
 			--warn-known-bad-format-calls \
 			--record-term-sizes-as-words \
 			--output-grade-string \
Index: compiler/options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.520
diff -u -r1.520 options.m
--- compiler/options.m	27 Jul 2006 05:01:17 -0000	1.520
+++ compiler/options.m	8 Aug 2006 02:26:07 -0000
@@ -865,7 +865,7 @@
     warn_known_bad_format_calls         -   bool(yes),
     warn_unknown_format_calls           -   bool(no),
     warn_obsolete                       -   bool(yes),
-    warn_insts_without_matching_type    -   bool(no)
+    warn_insts_without_matching_type    -   bool(yes)
 ]).
 option_defaults_2(verbosity_option, [
     % Verbosity Options
Index: library/Mercury.options
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mercury.options,v
retrieving revision 1.13
diff -u -r1.13 Mercury.options
--- library/Mercury.options	27 Mar 2006 01:02:26 -0000	1.13
+++ library/Mercury.options	8 Aug 2006 04:08:03 -0000
@@ -36,3 +36,10 @@
 MCFLAGS-string = --no-warn-unknown-format-calls
 
 MCFLAGS-mer_std = --no-warn-nothing-exported
+
+# Avoid warnings about insts with non-existent function symbols in their
+# bound lists.  The non-existent function symbols are used here to represent
+# insts for foreign types.
+#
+MCFLAGS-array += --no-warn-insts-without-matching-type
+MCFLAGS-io += --no-warn-insts-without-matching-type
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list