To fix the clang 16 breakage, some have written this: .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400091 CXXFLAGS+= -Wno-error=enum-constexpr-conversion .endif Since 13-STABLE recently (or at some point) got clang 16, this conditional prevents compilation of these ports on recent 13-STABLE. Some others have written this: .if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160 && ${ARCH} == aarch64 CXXFLAGS+= -Wno-error=enum-constexpr-conversion .endif I think the second one is the more correct solution, since it does not depend on OS version. Hence this bug report.
The correct solution is of course to fix the actual out-of-range enums, not to suppress the warning. :) That is what I did in the original patch for bug 272013. It also fixes the AddressingMode warning by changing its declaration to "enum AddressingMode : uint8_t".
Many levels of correctness for this level of complexity is not unheard of. I agree with you of course; I can't think of a valid reason that an enum would be set out of range (which doesn't mean there isn't one). For several weeks now I have been trying to get different versions of the OS (12 and 13 only tho) to build the same set of ports consistently. So for my goal, I have learned that he conditional that uses COMPILER_TYPE needs some USES=compiler declaration, so I have instead opted to do this: .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1302508 It's probably not as correct as it can be, but it seems to work. I would love to hear a more correct solution that doesn't involve a lot of devs doing a lot of work.
Not applicable any longer.