]> git.ipfire.org Git - thirdparty/systemd.git/commit - meson.build
meson: do not allow bit-shift overflows
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 9 Jun 2018 11:12:52 +0000 (13:12 +0200)
committerFilipe Brandenburger <filbranden@google.com>
Sat, 9 Jun 2018 19:42:30 +0000 (12:42 -0700)
commitb05ecb8cadd8c32d31b1aabcff4e507bd89b5465
tree2a4b67e57d84fcb2615ada87b0007dd71fb8f15c
parentb5cbe199c7a90c96d9178504bf0da1eec33e6d70
meson: do not allow bit-shift overflows

The primary motivation is to catch enum values created through a shift that is
too big:

../src/test/test-sizeof.c:26:29: error: left shift count >= width of type [-Werror=shift-count-overflow]
         enum_with_shift = 1 << 32,
                             ^~
cc1: some warnings being treated as errors

The compiler will now reject those.

This is an alternative to #9224.
meson.build