[m-rev.] diff: don't pass -Wpointer-arith to gcc in mmc
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu May 17 02:16:44 AEST 2001
Estimated hours taken: 0.25
Branches: main
compiler/mercury_compile.m:
Don't pass -Wno-pointer-arith to gcc, because it causes too many
spurious warnings in system header files. This matches a change
that I committed to scripts/mgnuc.in in March.
Workspace: /home/mars/fjh/ws1/mercury
Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.201
diff -u -d -r1.201 mercury_compile.m
--- compiler/mercury_compile.m 2001/05/10 11:41:10 1.201
+++ compiler/mercury_compile.m 2001/05/16 16:13:56
@@ -2947,6 +2947,9 @@
io__state, io__state).
:- mode mercury_compile__single_c_to_obj(in, in, out, di, uo) is det.
+% WARNING: The code here duplicates the functionality of scripts/mgnuc.in.
+% Any changes there may also require changes here, and vice versa.
+
mercury_compile__single_c_to_obj(C_File, O_File, Succeeded) -->
globals__io_lookup_bool_option(verbose, Verbose),
globals__io_lookup_string_option(c_flag_to_name_object_file,
@@ -3137,12 +3140,20 @@
InlineAllocOpt = ""
},
{ CompilerType = gcc ->
- % if --inline-alloc is enabled, don't enable missing-prototype
- % warnings, since gc_inline.h is missing lots of prototypes
+ % We don't enable `-Wpointer-arith', because it causes
+ % too many complaints in system header files.
+ % This is fixed in gcc 3.0, though, so at some
+ % point we should re-enable this.
+ %
+ % If --inline-alloc is enabled, don't enable missing-prototype
+ % warnings, since gc_inline.h is missing lots of prototypes.
+ %
+ % For a full list of the other gcc warnings that we don't
+ % enable, and why, see scripts/mgnuc.in.
( InlineAlloc = yes ->
- WarningOpt = "-Wall -Wwrite-strings -Wpointer-arith -Wshadow -Wmissing-prototypes -Wno-unused -Wno-uninitialized "
+ WarningOpt = "-Wall -Wwrite-strings -Wshadow -Wmissing-prototypes -Wno-unused -Wno-uninitialized "
;
- WarningOpt = "-Wall -Wwrite-strings -Wpointer-arith -Wshadow -Wmissing-prototypes -Wno-unused -Wno-uninitialized -Wstrict-prototypes "
+ WarningOpt = "-Wall -Wwrite-strings -Wshadow -Wmissing-prototypes -Wno-unused -Wno-uninitialized -Wstrict-prototypes "
)
; CompilerType = lcc ->
WarningOpt = "-w "
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| 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