Bug 64334 - Common .opt handling: Support flags which take a list of values (-fopt=a,b,c ...)
Summary: Common .opt handling: Support flags which take a list of values (-fopt=a,b,c ...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: 12.0
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic, easyhack, internal-improvement
Depends on:
Blocks:
 
Reported: 2014-12-16 22:57 UTC by Tobias Burnus
Modified: 2023-05-20 02:20 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2014-12-16 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2014-12-16 22:57:17 UTC
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.
Comment 1 Manuel López-Ibáñez 2014-12-16 23:10:55 UTC
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
Comment 2 Andrew Pinski 2023-05-20 02:20:29 UTC
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.