waf: only enable -Wsizeof-pointer-div for gcc v8.4 or greater

The -Wsizeof-pointer-div option doesn't exist in gcc v7.5, which is the
version used by Ubuntu 18.04 LTS. It does exist in v8.4.
This commit is contained in:
Nick Exton 2021-11-25 12:25:00 +11:00 committed by Peter Barker
parent beecca8da9
commit 5f74333559

View File

@ -319,6 +319,9 @@ class Board:
'-Werror=implicit-fallthrough', '-Werror=implicit-fallthrough',
'-Werror=maybe-uninitialized', '-Werror=maybe-uninitialized',
'-Werror=duplicated-cond', '-Werror=duplicated-cond',
]
if self.cc_version_gte(cfg, 8, 4):
env.CXXFLAGS += [
'-Werror=sizeof-pointer-div', '-Werror=sizeof-pointer-div',
] ]