Clang 16 has a new error about integer values being outside the valid range for enum types, which shows up when building www/node16: ../deps/v8/src/base/bit-field.h:43:29: error: integer value 7 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion] static constexpr T kMax = static_cast<T>(kNumValues - 1); ^ Upstream fixed most of these errors in <https://chromium.googlesource.com/v8/v8.git/+/d15d49b09d>, so add a backported version of it, with a few additions, to fix them.
Created attachment 242793 [details] www/node16: fix build with clang 16
This has been fixed in commit ee3e6d5a17a0c78bb56f8d5719de82b8dd49950d (although by different approach).
Fine for now, at some point the option to suppress these errors is going to go away upstream, then we can look at it again.
Same issue with node 18.16.1 but it fails on aarch64 but amd64 builds fine. https://people.freebsd.org/~eduardo/logs/node18/node18-18.16.1.log I've tested ee3e6d5a17a0c78bb56f8d5719de82b8dd49950d and it builds ok on aarch64. Any clues?
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274796