https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110032
Bug ID: 110032
Summary: Option Alias(opt, posarg, negarg) doesn't accept multi
args for posarg
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: crazylht at gmail dot com
Target Milestone: ---
.i.e.
If define
fcf-protection
Common RejectNegative Alias(fcf-protection=,branch, return)
fcf-protection=
Common Joined Enum(cf_protection_level) EnumBitset Var(flag_cf_protection)
-fcf-protection=[full|branch|return|none|check] Instrument functions with
checks to verify jump/call/return control-flow transfer
instructions have valid targets.
Enum
Name(cf_protection_level) Type(enum cf_protection_level) UnknownError(unknown
Control-Flow Protection Level %qs)
EnumValue
Enum(cf_protection_level) String(branch) Value(CF_BRANCH)
EnumValue
Enum(cf_protection_level) String(return) Value(CF_RETURN)
EnumValue
Enum(cf_protection_level) String(check) Value(CF_CHECK)
It will be intepretted as -fcf-protection=branch, but not
-fcf-protection=branch,return. It's due to both Alias and EnumBitSet use *,* as
delimiter and can't tell if it's multi args in EnumBitSet or in Alias posarg.
And yes we can introduce another parameter full to cover all bits but then
EnumBiSet can't be used since it require every parameter to be power of 2.