svn commit: r228606 - head/share/mk
Dimitry Andric
dim at FreeBSD.org
Fri Dec 16 23:42:26 UTC 2011
Author: dim
Date: Fri Dec 16 23:42:25 2011
New Revision: 228606
URL: http://svn.freebsd.org/changeset/base/228606
Log:
Add a NO_WARRAY_BOUNDS setting to bsd.sys.mk, only applicable to clang,
to selectively work around warnings in programs that don't use flexible
array members, but instead define arrays of length 1 at the end of the
struct, and then access those beyond their declared bounds.
MFC after: 1 week
Modified:
head/share/mk/bsd.sys.mk
Modified: head/share/mk/bsd.sys.mk
==============================================================================
--- head/share/mk/bsd.sys.mk Fri Dec 16 23:40:56 2011 (r228605)
+++ head/share/mk/bsd.sys.mk Fri Dec 16 23:42:25 2011 (r228606)
@@ -70,6 +70,9 @@ CWARNFLAGS += -Wno-switch-enum
. if ${WARNS} <= 1
CWARNFLAGS += -Wno-parentheses
. endif
+. if defined(NO_WARRAY_BOUNDS)
+CWARNFLAGS += -Wno-array-bounds
+. endif
. endif
. endif
More information about the svn-src-head
mailing list