diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-06-09 13:12:52 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-08-24 16:47:08 +0200 |
commit | ec4b18ddb9cc1df4ac410614308c6f520d6c6c81 (patch) | |
tree | bdda9a779eeba8a0f3310141a42655b4e8ff87df /meson.build | |
parent | 851be93e91cfcb9de7e7a3e27503244ba4072e97 (diff) |
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.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 1356ae996..fe014eda7 100644 --- a/meson.build +++ b/meson.build @@ -386,6 +386,7 @@ endif # '-Wstrict-aliasing=2', # '-Wwrite-strings', # '-Werror=overflow', +# '-Werror=shift-count-overflow', # '-Wdate-time', # '-Wnested-externs', # '-ffast-math', @@ -1928,6 +1929,7 @@ executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', executable('elogind-user-runtime-dir', +executable('elogind-user-runtime-dir', user_runtime_dir_sources, include_directories : includes, link_with : [libshared, liblogind_core], |