summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2006-04-21 18:24:09 +0000
committerChad Loder <cloder@cvs.openbsd.org>2006-04-21 18:24:09 +0000
commite3e9107f92520c058f016fc4f40645243f7ced0f (patch)
treeb81790310d1c744a4e45668bc0ef17d5da20a50a /usr.bin
parente70846cfac303258594c76f2687174a451b73f6f (diff)
On gcc3, specify -CC to the preprocessor (preserve comments even in macro
expansios). On gcc 2.95, we can't do this yet because the preprocessor support for -CC is not fully functional yet. OK deraadt@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/xlint/xlint/xlint.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c
index 5bc5da12bdb..376c91d5f76 100644
--- a/usr.bin/xlint/xlint/xlint.c
+++ b/usr.bin/xlint/xlint/xlint.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xlint.c,v 1.29 2006/04/18 22:34:17 cloder Exp $ */
+/* $OpenBSD: xlint.c,v 1.30 2006/04/21 18:24:08 cloder Exp $ */
/* $NetBSD: xlint.c,v 1.3 1995/10/23 14:29:30 jpo Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: xlint.c,v 1.29 2006/04/18 22:34:17 cloder Exp $";
+static char rcsid[] = "$OpenBSD: xlint.c,v 1.30 2006/04/21 18:24:08 cloder Exp $";
#endif
#include <sys/param.h>
@@ -313,10 +313,14 @@ main(int argc, char *argv[])
appcstrg(&cppflags, "-undef");
/* even with -undef cpp still identifies as GNUC */
appcstrg(&cppflags, "-U__GNUC__");
-#if defined(__GNUC__) && __GNUC__ < 3
+#if defined(__GNUC__)
+#if __GNUC__ < 3
appcstrg(&cppflags, "-$");
-#endif
appcstrg(&cppflags, "-C");
+#else
+ appcstrg(&cppflags, "-CC");
+#endif
+#endif
appcstrg(&cppflags, "-Wcomment");
appcstrg(&cppflags, "-D__OpenBSD__");
appcstrg(&cppflags, "-Dlint"); /* XXX don't def. with -s */