Subject: trigraphs
To: None <tech-userlevel@netbsd.org>
From: Matt Fredette <fredette@theory.lcs.mit.edu>
List: tech-userlevel
Date: 07/06/2002 10:10:58
Hi. Two files in the source tree have inadvertent trigraphs in them:
src/dist/tcpdump/print-dhcp6.c
src/usr.sbin/pppd/pppd/options.c
In both GCC 2 and GCC 3, -Wall is supposed to turn on trigraph warnings.
GCC 2, however, is completely blind to trigraphs unless -trigraphs is
also given, somewhat defeating the warning intent.
GCC 3 fixes this mistake, which means warnings on these two files, that
then trip -Werror.
Any objections to the following patch?
Matt
--
Matt Fredette
[snip]
Index: bsd.sys.mk
===================================================================
RCS file: /cvsroot/sharesrc/share/mk/bsd.sys.mk,v
retrieving revision 1.79
diff -u -r1.79 bsd.sys.mk
--- bsd.sys.mk 2002/05/30 21:44:07 1.79
+++ bsd.sys.mk 2002/07/06 14:06:21
@@ -12,6 +12,9 @@
# XXX Delete -Wuninitialized by default for now -- the compiler doesn't
# XXX always get it right.
CFLAGS+= -Wno-uninitialized
+# XXX Delete -Wtrigraphs by default for now -- the source tree isn't
+# XXX trigraph-clean yet.
+CFLAGS+= -Wno-trigraphs
.endif
.if ${WARNS} > 1
CFLAGS+= -Wreturn-type -Wswitch -Wshadow
[snip]