Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Enable c99 mode by default.
details: https://anonhg.NetBSD.org/src/rev/e0ee3f6a6053
branches: trunk
changeset: 765039:e0ee3f6a6053
user: christos <christos%NetBSD.org@localhost>
date: Tue May 17 01:12:34 2011 +0000
description:
Enable c99 mode by default.
This has the side effect of complaining for missing prototypes
implicit type declarations and missing return statements.
NB: I've only ran a build on amd64, so other platforms MI code might break.
If you can't wait for me to fix them, revert this commit.
diffstat:
share/mk/bsd.kmodule.mk | 3 +--
share/mk/bsd.sys.mk | 10 ++++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
diffs (48 lines):
diff -r 062f29409b03 -r e0ee3f6a6053 share/mk/bsd.kmodule.mk
--- a/share/mk/bsd.kmodule.mk Mon May 16 21:51:31 2011 +0000
+++ b/share/mk/bsd.kmodule.mk Tue May 17 01:12:34 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.kmodule.mk,v 1.28 2011/04/17 09:47:40 mrg Exp $
+# $NetBSD: bsd.kmodule.mk,v 1.29 2011/05/17 01:12:34 christos Exp $
# We are not building this with PIE
MKPIE=no
@@ -17,7 +17,6 @@
CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -isystem $S -isystem $S/arch
CPPFLAGS+= -isystem ${S}/../common/include
CPPFLAGS+= -D_KERNEL -D_LKM -D_MODULE
-CPPFLAGS+= -std=gnu99
# XXX until the kernel is fixed again...
.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
diff -r 062f29409b03 -r e0ee3f6a6053 share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk Mon May 16 21:51:31 2011 +0000
+++ b/share/mk/bsd.sys.mk Tue May 17 01:12:34 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.sys.mk,v 1.193 2010/12/25 18:56:45 joerg Exp $
+# $NetBSD: bsd.sys.mk,v 1.194 2011/05/17 01:12:34 christos Exp $
#
# Build definitions used for NetBSD source tree builds.
@@ -10,6 +10,13 @@
CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/
.endif
+# Enable c99 mode by default.
+# This has the side effect of complaining for missing prototypes
+# implicit type declarations and missing return statements.
+.if defined(HAVE_GCC) && ${HAVE_GCC} >= 3
+CFLAGS+= -std=gnu99
+.endif
+
.if defined(WARNS)
.if ${WARNS} > 0
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
@@ -47,7 +54,6 @@
.endif
.if ${WARNS} > 3 && defined(HAVE_GCC) && ${HAVE_GCC} >= 3
CFLAGS+= -Wsign-compare
-CFLAGS+= -std=gnu99
.endif
.endif
Home |
Main Index |
Thread Index |
Old Index