https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123206
--- Comment #3 from Alice Carlotti <acarlotti at gcc dot gnu.org> --- > 1. Make aarch64-builtins.cc:aarch64_pragma_builtins declared constexpr. This > would prevent uses of global_options via TARGET_* macros. That sounds like reasonable improvement. However, I'll note that we might some day need to support more flexible gating here. I don't think this has come up (architecturally) in SIMD yet, but there are multiple cases in SVE/SME where we ought to support an intrinsic when either of two different features is enabled. > 2. Make the ctor of aarch64_feature_flags (i.e. bbitmap) declared explicit. I originally wanted to prevent any initialisation from a single int, but Richard Sandiford suggested we should allow it - see https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652191.html for the original discussion. However, I think we can do better. The specific issue we have in this case is that our constructor allow conversion from a boolean type. In future we might be able to narrow the range of accepted types using C++20 type constraints, but that isn't an option now. Instead, we can address the current issue by adding a more specific constructor and marking it private - e.g.: private: constexpr bbitmap(bool x) : val{x} {}
