summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-11 13:17:43 +0200
committerLennart Poettering <lennart@poettering.net>2018-06-11 17:06:58 +0200
commitd28b67d46a1f39569231d070f41365b71cc55e8f (patch)
treee355111cef257ca82129451f41b1f403597170b1 /meson.build
parent86ab333d00ca39c5c95174513db40546cb1268d1 (diff)
meson: also reject shifts that change the sign bit
../src/test/test-sizeof.c: In function ‘main’: ../src/test/test-sizeof.c:70:24: error: result of ‘1 << 31’ requires 33 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=] X = (1 << 31), ^~ cc1: some warnings being treated as errors Follow-up for b05ecb8cadd8c32d31b1aabcff4e507bd89b5465.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build1
1 files changed, 1 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 29ee446d56..3644e8d5cb 100644
--- a/meson.build
+++ b/meson.build
@@ -320,6 +320,7 @@ possible_cc_flags = [
'-Wwrite-strings',
'-Werror=overflow',
'-Werror=shift-count-overflow',
+ '-Werror=shift-overflow=2',
'-Wdate-time',
'-Wnested-externs',
'-ffast-math',