Decouple clang and gcc handling a bit. Add -Wmissing-noreturn for clang
builds. GCC complains about about non-void functions not returning, which is quite a bit more bogus, so don't enable it for that.
This commit is contained in:
parent
39079c5f77
commit
9b296e99bc
@ -1,4 +1,4 @@
|
||||
# $NetBSD: bsd.sys.mk,v 1.208 2011/08/23 05:22:25 christos Exp $
|
||||
# $NetBSD: bsd.sys.mk,v 1.209 2011/09/20 09:11:06 joerg Exp $
|
||||
#
|
||||
# Build definitions used for NetBSD source tree builds.
|
||||
|
||||
@ -61,7 +61,9 @@ CXXFLAGS+= ${${ACTIVE_CXX} == "gcc":? -Wno-non-template-friend -Wno-pmf-conversi
|
||||
.endif
|
||||
.if ${WARNS} > 3 && defined(HAVE_GCC)
|
||||
CFLAGS+= -Wsign-compare -Wformat=2
|
||||
CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wpointer-sign :}
|
||||
.endif
|
||||
.if ${WARNS} > 3 && defined(HAVE_LLVM)
|
||||
CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wpointer-sign -Wmissing-noreturn :}
|
||||
.endif
|
||||
.if (defined(HAVE_GCC) && ${HAVE_GCC} == 45 \
|
||||
&& (${MACHINE_ARCH} == "sh3eb" || ${MACHINE_ARCH} == "sh3el"))
|
||||
|
Loading…
Reference in New Issue
Block a user