Hi,
I've been building the NetBSD-current tree with a recent Clang (22+) for a
project and there are quite a few -Werror failures from warnings that GCC
doesn't emit.
My thought is to suppress the high-volume warnings globally and submit
code fixes for the rest.
For the high-volume suppressions, I'd like to propose adding these three to
bsd.sys.mk under CWARNFLAGS.clang:
* -Wno-error=deprecated-non-prototype (~100+ instances, distributed.)
* -Wno-error=strict-prototypes (~50+ instances, same packages)
* -Wno-error=unused-but-set-variable (~50+ instances)
These are all C23 intolerance or Clang-vs-GCC divergences that fire across
multiple architectures (amd64, i386, ...). At this volume, per-file
suppression is impractical.
I'd also include -Wno-unknown-warning-option as a safety net so the same
bsd.sys.mk works with both the in-tree Clang 13 and newer versions.
Thoughts?
Also is there any thought to upgrading the Clang version -- Clang 13 is 4.5 years old.?
thanks,
FireTurtle