summaryrefslogtreecommitdiffstats
path: root/bin/expr
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-03-22 22:40:32 +0000
committerdim <dim@FreeBSD.org>2015-03-22 22:40:32 +0000
commit1aff4e708bc72a062c5e3021d6a47424e415a9fd (patch)
tree30337f575f7f2c78cbdb52358d809c28e0f14880 /bin/expr
parent7bc5de3287d135b461f58a24b595cdcd49b9cffa (diff)
downloadFreeBSD-src-1aff4e708bc72a062c5e3021d6a47424e415a9fd.zip
FreeBSD-src-1aff4e708bc72a062c5e3021d6a47424e415a9fd.tar.gz
Build expr with -fwrapv, since it relies on signed integer wrapping
having defined behavior. Reported by: rodrigc MFC after: 3 days
Diffstat (limited to 'bin/expr')
-rw-r--r--bin/expr/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/expr/Makefile b/bin/expr/Makefile
index a1f6cbf..1d741b7 100644
--- a/bin/expr/Makefile
+++ b/bin/expr/Makefile
@@ -6,6 +6,9 @@ PROG= expr
SRCS= expr.y
YFLAGS=
+# expr relies on signed integer wrapping
+CFLAGS+= -fwrapv
+
NO_WMISSING_VARIABLE_DECLARATIONS=
.if ${MK_TESTS} != "no"
OpenPOWER on IntegriCloud