From: Zbigniew Jędrzejewski-Szmek Date: Mon, 11 Jun 2018 11:17:43 +0000 (+0200) Subject: meson: also reject shifts that change the sign bit X-Git-Tag: v239~97 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d28b67d46a1f39569231d070f41365b71cc55e8f;p=platform%2Fupstream%2Fsystemd.git 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. --- diff --git a/meson.build b/meson.build index 29ee446..3644e8d 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',