Split off from PR54687. There are some options which take a list of values – and applies bitwise OR to the choice. Example: fsanitize= which takes "address" (SANITIZE_ADDRESS | SANITIZE_USER_ADDRESS), "kernel-address" (SANITIZE_ADDRESS | SANITIZE_KERNEL_ADDRESS), "thread" (SANITIZE_THREAD) etc. as argument. Similarly, in Fortran: -ffpe-trap and -ffpe-summary which take "invalid", "denormal" etc. or -fcheck= with "all", "bounds", ... It would be useful it one could extend the current Enum scheme to support this.
There is also -fsanitize-recover= and --help= --help=<class> Display descriptions of a specific class of options. <class> is one or more of optimizers, target, warnings, undocumented, params
EnumBitSet was added with r12-6842-g0ebb09f5e49c8c . EnumSet/Set was added with r12-6839-g385196adb52d85 . So fixed with GCC 12. Note fsanitize= is still not using those for other reasons.